From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | c3po(at)West-Call(dot)COM (Yuri Kulaghin) |
Cc: | pgsql-admin(at)postgreSQL(dot)org |
Subject: | Re: [ADMIN] Why my index does not increase performance? |
Date: | 1998-10-14 16:34:02 |
Message-ID: | 199810141634.MAA26832@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
> Hi, All!
>
> My database has a big table (more 1 million records) that contains
> a date field. This field has approximately 150 unique values (dates
> of five monthes) per table. I created index as follow:
>
> create index mytable_ind on mytable (mydate date_ops);
>
> Next, I perform following query:
>
> select max(mydate) from mytable;
>
> And time length of this query is about 100 seconds! I think postgres
> looks up ALL records in the table to find max value and does not use
> created index. Why? Database is vacuumed, PostgreSQL 6.3.2 on Solaris
> 2.5.1/x86, CPU P166, RAM 64 Mb.
It is on our TODO list.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Jackson, DeJuan | 1998-10-14 20:47:51 | RE: [ADMIN] re: binary/build woes, procedural question |
Previous Message | Oleg Broytmann | 1998-10-14 14:44:22 | Re: [ADMIN] re: binary/build woes, procedural question |