I have two tables Table 'A' which is non-partitioned and Table 'B' which is custom partitioned on a column Year with an interval of 5, starting integer is 2010 and ending integer is 2025 .
Schema for table A
serial, string, Timestamp
1 | val_1 | 2010-01-01 00:00:00
2 | val_2 | 2011-01-01 00:00:00
and so on..
Schema for table B
serial, string, Year, Timestamp
1 | val_1 | 2010 | 2010-01-01 00:00:00
2 | val_2 | 2011 |2011-01-01 00:00:00
and so on..
But when I try to query Table A using the following command
SELECT * FROM A WHERE TIMESTAMP BETWEEN '2010-01-01 00:00:00' AND '2014-01-01 00:00:00'
The execution time of the above query is the same as the execution time for the Partitioned Table
Query For the Partitioned Table
SELECT * FROM B WHERE YEAR BETWEEN 2010 AND 2014
Why is the execution time the same? Is there some mistake in the approach?