Re: FW: Index usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "BBI Edwin Punzalan" <edwin@xxxxxxxxxxxxx>

> db=# explain analyze select date from chatlogs where date>='11/23/04' and
> date<'11/25/04';
> NOTICE:  QUERY PLAN:
> 
> Seq Scan on chatlogs  (cost=0.00..24763.19 rows=9200 width=4) (actual
> time=0.45..4268.00 rows=23787 loops=1)
> Total runtime: 4282.81 msec
> ==============
> 
> How come a query on the current date filter uses an index and the others
> does not?  This makes indexing to speed up queries quite difficult.

have you ANALYZED the table lately ?
what version postgres are you using ?

gnari






[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux