From: Tom Lane <tgl@sss.pgh.pa.us>
To: Arshavir Grigorian <ag@m-cam.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: index use
Date: Fri, 19 Nov 2004 15:09:31 -0500
Message-ID: <14526.1100894971@sss.pgh.pa.us> (raw)
In-Reply-To: <419E471F.6040006@m-cam.com>
References: <419E471F.6040006@m-cam.com>
Arshavir Grigorian <ag@m-cam.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
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, ag@m-cam.com
Subject: Re: index use
In-Reply-To: <14526.1100894971@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