Between the following two queries
SELECT
CASE WHEN col1=1 THEN "one"
WHEN col1=2 THEN "two"
ELSE "whatever"
END AS numb from TABLE1 WHERE col1=1 or col1=2
SELECT
CASE WHEN col1=1 THEN "one"
WHEN col1=2 THEN "two"
ELSE "whatever"
END AS numb from TABLE1
Are there any significant differences between two in terms of time complexity? I know the output table for the first table will be smaller due to the condition under WHERE filter, but would it also take more time due to the WHERE filter?
I wanna know how much time WHERE filter would consume.
Any help would be greatly appreciated.