Imagine you have table t where statusID is a calculated field based on status. 'Live'=1, 'Deleted'=2 and so on. t is partitioned by statusID meaning that all 1 goes into a partition, all 2 goes into another etc. Now let's query t. If I want all live records can I use WHERE status='live' or must I use where statusID=1 to take advantage of the partition?
WHERE status='live'
where statusID=1
2.1m questions
2.1m answers
60 comments
57.0k users