pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Xevi Serrats <tomcatbsd@yahoo.es>
To: pgsql-performance@postgresql.org
Subject: Re: Yet another question about not use on indexes
Date: Sun, 11 May 2003 15:08:34 +0100
Message-ID: <200305111508.34714.dev@archonet.com> (raw)
In-Reply-To: <20030511131600.47686.qmail@web13001.mail.yahoo.com>
References: <20030511131600.47686.qmail@web13001.mail.yahoo.com>

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




view thread (3+ messages)  latest in thread

Message-ID: <200305111508.34714.dev@archonet.com>
Permalink:  ../200305111508.34714.dev@archonet.com/
Also on:    postgresql.org/message-id/200305111508.34714.dev@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: dev@archonet.com, tomcatbsd@yahoo.es
  Subject: Re: Yet another question about not use on indexes
  In-Reply-To: <200305111508.34714.dev@archonet.com>
  References: <20030511131600.47686.qmail@web13001.mail.yahoo.com> <200305111508.34714.dev@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox