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

Re: Basic question about indexes/explain

From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: Terry Yapt <pgsql(at)technovell(dot)com>,pgsql-performance(at)postgresql(dot)org
Subject: Re: Basic question about indexes/explain
Date: 2002-10-26 11:40:06
Message-ID: 200210261340.06876.mweilguni@sime.com (view raw or flat)
Thread:
Lists: pgsql-performance
Am Samstag, 26. Oktober 2002 12:27 schrieb Terry Yapt:
> Hi all,
>
snip
> I have a basic doubt about indexes...  in the next example:
> But if we have an index with the two colums I am using in the WHERE clause,
> why is the planner using seq scan ?  (Or perhaps it is because too few rows
> in the table ?)....

First of all, you did not analyze your table (at least you did not mention you did). And an index is never a win for such a small table. I think the planner is fine here to select a seq scan, because your whole table is only 1 database page, so it would be no win to check the index here.

Everything is explained in the manual, check http://developer.postgresql.org/docs/postgres/indexes.html

regards,
	mario weilguni

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2002-10-26 14:24:52
Subject: Re: Basic question about indexes/explain
Previous:From: Terry YaptDate: 2002-10-26 10:27:28
Subject: Basic question about indexes/explain

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