From the course: Advanced SQL for Query Tuning and Performance Optimization
Unlock the full course today
Join today to access over 23,400 courses taught by industry experts.
Partition by list example - SQL Tutorial
From the course: Advanced SQL for Query Tuning and Performance Optimization
Partition by list example
- [Instructor] Now we're going to implement a table using list partitioning. And look, we're going to start by creating a product table. And so for that we're going to say CREATE TABLE. And we're going to call this table products. And in this table we will have a product id which will be an integer and not null. And we will also have a product name, which will be a text. And let's say that's required, so that's not null. And let's have a product description, which will be of type text and a product category which is also of type text. Now, again, we have a basic table here, and we're going to indicate that we want this table to be partitioned by using the PARTITION BY clause and specifying the type of partition we're using. In this case it's LIST partitioning, and how we want this to be partitioned? What value should we look at? And in this case, it's going to be the product category that we're going to look at. So…
Contents
-
-
-
-
-
-
-
Horizontal vs. vertical partitioning2m 47s
-
(Locked)
Partition by range1m 40s
-
(Locked)
Partition by range example5m 36s
-
(Locked)
Partition by list1m 27s
-
(Locked)
Partition by list example5m 37s
-
(Locked)
Partition by hash1m 55s
-
(Locked)
Partition by hash example4m 35s
-
(Locked)
Challenge: Partitioning a table36s
-
(Locked)
Solution: Partitioning a table28s
-
-
-
-
-