Skip site navigation (1) Skip section navigation (2)

Re: Indices arent being used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rantunes(at)student(dot)dei(dot)uc(dot)pt
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Indices arent being used
Date: 2003-09-26 14:35:36
Message-ID: 15414.1064586936@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
rantunes(at)student(dot)dei(dot)uc(dot)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

In response to

pgsql-performance by date

Next:From: Mary Edie MeredithDate: 2003-09-26 16:11:37
Subject: Re: TPC-R benchmarks
Previous:From: Ron JohnsonDate: 2003-09-26 12:37:35
Subject: Re: populate table with large csv file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group