Another "why am I not using the indicies?"
От | Clinton James |
---|---|
Тема | Another "why am I not using the indicies?" |
Дата | |
Msg-id | LDEHLKIELLEDPDLPHDILAEBJCHAA.cjames@callone.net обсуждение исходный текст |
Ответы |
Re: Another "why am I not using the indicies?"
|
Список | pgsql-general |
Here is all the information about the system and the steps I took. If you can tell me or point me in the right direction I would appreciate it. There are 624306 records in this table, so it only takes a few seconds, but this is going to grow to 5M rows/month when this works properly. Clinton James #select version(); version ---------------------------------------------------------------------- PostgreSQL 7.1rc4 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66 (1 row) #CREATE TABLE ld ( billmonth CHAR(4), cust_num CHAR(8), location CHAR(4), date TIMESTAMP, orignum CHAR(10), destnum CHAR(13), destcity CHAR(10), deststate CHAR(2), duration NUMERIC(8,1), callcode CHAR(9), cost NUMERIC(10,4) ); #copy ld from '/tmp/ld0104.txt'; #create index ld_custnum_idx ON ld(cust_num); #create index ld_orignum_idx ON ld(orignum); #vacuum analyze; # explain select * from ld where cust_num = '10102899'; NOTICE: QUERY PLAN: Seq Scan on ld (cost=0.00..20810.83 rows=8989 width=128)
В списке pgsql-general по дате отправления: