On Sunday 11 May 2003 2:16 pm, Xevi Serrats wrote:
> Hi,
>
> I have created a table whit some indexes. I analize
> the query of this table and never use index.
> pfc=# \d document
> Table
> "public.document"
> Column | Type |
> Modifiers
> ------------+--------------------------+-----------------------------------
>----------------- codi | integer | not null
> default nextval('seq_document'::text)
> nom | character varying(32) | not null
etc...
> pfc=# explain select * from document where codi=2;
> QUERY PLAN
> ----------------------------------------------------------
> Seq Scan on document (cost=0.00..1.19 rows=1
> width=120)
> Filter: (codi = 2)
> (2 rows)
1. Have you done a VACUUM ANALYSE?
2. How many rows are in this table?
3. Can you post the output of EXPLAIN ANALYSE SELECT... - that actually runs
the query.
--
Richard Huxton