From: Derryck w. <der...@ce...> - 2008-06-20 14:05:48
|
Hi , I always assumed using an index works faster ( well it is faster when the count volume is low). but this case proved otherwise (when the counted volume gets very high). select count(*) as count_order from lineitem where l_shipdate <= date '1998-12-01' - 90; With index on l_shipdate PLAN (LINEITEM INDEX (LINEITEM_SHIPDATE)) Current memory = 4633132 Delta memory = 3696420 Max memory = 4633132 Elapsed time= 39.14 sec Buffers = 75 Reads = 111237 Writes 0 Fetches = 11837255 Without index works faster ! PLAN (LINEITEM NATURAL) Current memory = 1009304 Delta memory = 72592 Max memory = 1156720 Elapsed time= 35.66 sec Buffers = 75 Reads = 107563 Writes 0 Fetches = 12217691 tested on 2.1 and 2.1.1RC1 Can i put this in the tracker ? Regards, Derryck |