| From: | Douglas McNaught <doug(at)mcnaught(dot)org> |
|---|---|
| To: | Dan Black <fireworker(at)gmail(dot)com> |
| Cc: | PgSQL General List <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Index does not working. |
| Date: | 2005-06-13 20:15:43 |
| Message-ID: | m21x76xbbk.fsf@Douglas-McNaughts-Powerbook.local |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Dan Black <fireworker(at)gmail(dot)com> writes:
> 1)
> select * from my_table where active and deleted
> --------------
> Seq Scan on my_table (cost=100000000.00..100000180.00 rows=2500 width=56)
> Filter: (active AND deleted)
>
> 2)
> select * from my_table where active = true and deleted = true
> -------------
> Index Scan using my_table_index on my_table (cost=0.00..369.00 rows=2500
> width=56)
> Index Cond: ((deleted = true) AND (active = true))
Looks like you haven't ever ANALYZED this table.
-Doug
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Együd Csaba | 2005-06-13 20:27:31 | PG 8.0.1 is getting slow in 24 hours. Only daily VACUUM FULL helps |
| Previous Message | Dan Black | 2005-06-13 20:09:11 | Re: Index does not working. |