Well, you aren't just doing a count, you are also asking for distinct rows (theres a sort operation going on). Therefore, you might expect it to take a little longer:
Code:select count(i_id) from x; COUNT(I_ID) ----------- 1020399 Elapsed: 00:00:01.19 select count(distinct(i_id)) from x; COUNT(DISTINCT(I_ID)) --------------------- 720449 Elapsed: 00:00:04.61




Reply With Quote