pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: rantunes@student.dei.uc.pt
Cc: pgsql-performance@postgresql.org
Subject: Re: Indices arent being used
Date: Fri, 26 Sep 2003 10:35:36 -0400
Message-ID: <15414.1064586936@sss.pgh.pa.us> (raw)
In-Reply-To: <200309261057.h8QAvSXA009541@student.dei.uc.pt>
References: <200309261057.h8QAvSXA009541@student.dei.uc.pt>

rantunes@student.dei.uc.pt writes:
> sort_mem = 2048

2 meg sort_mem seems on the small side.

> Yes I have an index on actvars.product_level and an index on
> prodlevel.code_level.Both indices have character(12) data types.

Can you force an indexscan to be chosen by setting enable_seqscan off?
If so, what does the explain look like?

BTW, it's always much more useful to show EXPLAIN ANALYZE output than
plain EXPLAIN.  The issue is generally "why did the planner misestimate"
and so knowing how its estimates diverge from reality is always a
critical bit of information.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <15414.1064586936@sss.pgh.pa.us>
Permalink:  ../15414.1064586936@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15414.1064586936@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rantunes@student.dei.uc.pt
  Subject: Re: Indices arent being used
  In-Reply-To: <15414.1064586936@sss.pgh.pa.us>

* 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