Re: question about seq scan and index scan

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Hervé Piedvache <herve(at)elma(dot)fr>
Cc: Sébastien PALLEAU <spalleau(at)elma(dot)fr>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: question about seq scan and index scan
Date: 2002-10-25 18:17:08
Message-ID: 20021025111313.W38137-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Fri, 25 Oct 2002, [iso-8859-15] Herv Piedvache wrote:

> Thanks for you help ... to "explain" us why Postgresql do not use all the
> time the index scan for this kind of request for 3 tables with the same
> primary key id.

Depending on the number of rows returned, index scan may not be faster
than a sequential scan. As you up the constant, the estimated number of
rows drops which make the index scan a better and better plan. Are
the estimated number of rows for the scan of a (4379, 3987, and 29)
realistic for mynumber>(23000, 23500, 24000)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message terry 2002-10-25 18:37:56 Using the IN clauise
Previous Message Robert Treat 2002-10-25 18:15:42 Re: [General] Warning: Unable to connect to PostgreSQL