DEV Community

Discussion on: Optimizing Application Queries With Partition Pruning

 
denismagda profile image
Denis Magda

Yeap, you’re right, I confused you. Meant to say that with a single table you index the whole data set and do search with that index.

With table partitioning, you also can define indexes for individual partitions (partitioned tables). Thus, when you run a query two optimizations can kick in - first the partition pruning removes unnecessary partitions/tables and then you do an index search for the remaining partition/table.