17 Oct
2014
17 Oct
'14
9:05 a.m.
SELECT col1 FROM tbl WHERE col1 = 1 ; is executed in 5 ms. Table has 1 billion rows, resultset is about 350 rows. Same statement, but with LIMIT/OFFSET SELECT col1 FROM tbl WHERE col1 = 1 LIMIT 1 OFFSET 0 ; is executed in 1,03 s. Can't believe that subsetting from 350 to 1 takes 1 second.