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: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Am Samstag, 26. Oktober 2002 12:27 schrieb Terry Yapt:
> Hi all,
> 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

	mario weilguni

In response to


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-2017 The PostgreSQL Global Development Group