Re: [GENERAL] Problems with inequalities on numeric fields in 6.5
| От | Bruce Momjian |
|---|---|
| Тема | Re: [GENERAL] Problems with inequalities on numeric fields in 6.5 |
| Дата | |
| Msg-id | 199907070807.EAA09613@candle.pha.pa.us обсуждение |
| Ответ на | Re: [GENERAL] Problems with inequalities on numeric fields in 6.5 (Martin Weinberg <weinberg@osprey.phast.umass.edu>) |
| Ответы |
Re: [GENERAL] Problems with inequalities on numeric fields in 6.5
|
| Список | pgsql-general |
> 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
В списке pgsql-general по дате отправления: