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

Re: index use

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Arshavir Grigorian <ag(at)m-cam(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: index use
Date: 2004-11-19 20:09:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Arshavir Grigorian <ag(at)m-cam(dot)com> writes:
> I have a query that when run on similar tables in 2 different databases 
> either uses the index on the column (primary key) in the where clause or 
> does a full table scan. The structure of the tables is the same, except 
> that the table where the index does not get used has an extra million 
> rows (22mil vs 23mil).

I'd say you initialized the second database in a non-C locale.  The
planner is clearly well aware that the seqscan is going to be expensive,
so the explanation has to be that it does not have a usable index available.

			regards, tom lane

In response to

  • index use at 2004-11-19 19:18:55 from Arshavir Grigorian

pgsql-performance by date

Next:From: Chris BrowneDate: 2004-11-19 20:23:15
Subject: Re: When to bump up statistics?
Previous:From: Steinar H. GundersonDate: 2004-11-19 20:00:06
Subject: Re: index use

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