От: BBI Edwin Punzalan
Тема: Re: FW: Index usage
Дата: ,
Msg-id: 000501c4d20a$1b842ed0$b400a8c0@bluebamboo.ph
(см: обсуждение, исходный текст)
Ответ на: Re: FW: Index usage  ("gnari")
Список: pgsql-performance

Скрыть дерево обсуждения

FW: FW: Index usage  ("BBI Edwin Punzalan", )
 Re: FW: Index usage  ("gnari", )
  Re: FW: Index usage  ("BBI Edwin Punzalan", )
   Re: FW: Index usage  ("gnari", )
    Re: FW: Index usage  ("BBI Edwin Punzalan", )
     Re: FW: Index usage  ("gnari", )
      Re: FW: Index usage  ("BBI Edwin Punzalan", )
       Re: FW: Index usage  ("Iain", )
        Re: FW: Index usage  ("BBI Edwin Punzalan", )
         Re: FW: Index usage  ("Iain", )
       Re: FW: Index usage  ("gnari", )
 Re: FW: FW: Index usage  (Richard Huxton, )
  Re: FW: FW: Index usage  ("BBI Edwin Punzalan", )
   Re: FW: FW: Index usage  (Richard Huxton, )

Yes, the database is being vacuum-ed and analyzed on a daily basis.

Our version is 7.2.1

-----Original Message-----
From: gnari [mailto:]
Sent: Wednesday, November 24, 2004 4:35 PM
To: BBI Edwin Punzalan; 
Subject: Re: [PERFORM] FW: Index usage


From: "BBI Edwin Punzalan" <>

> 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





В списке pgsql-performance по дате сообщения:

От: Alexandre Leclerc
Дата:
Сообщение: Re: Data type to use for primary key
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Postgres vs. MySQL