> lmc=> explain select count(*) from lmctot where j_m>'3.4' and j_m<'3.5';
> NOTICE: QUERY PLAN:
>
> Aggregate (cost=62349.97 rows=788100 width=4)
> -> Index Scan using j on lmctot (cost=62349.97 rows=788100 width=4)
>
>
Please try this:
lmc=> explain select count(*) from lmctot where j_m>3.4::float4 and
j_m<3.5::float4
Also, given your min/max, I am not sure why it thinks it is going to get
788,100 rows. How many rows in the table again?
Does (3.5-3.4)/(max-min) * #rows = 788k?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026