Re: index / sequential scan problem

From: Fabian Kreitner <fabian(dot)kreitner(at)ainea-ag(dot)de>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: index / sequential scan problem
Date: 2003-07-17 11:13:06
Message-ID: 5.1.0.14.0.20030717131157.03957fa0@195.145.148.245
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

At 12:12 17.07.2003, you wrote:

>On 17/07/2003 10:01 Fabian Kreitner wrote:
>
>Hi Fabian,
>
>When you are doing these kinds of tests, you need to be aware that the
>kernel may have most of your data cached after the first query and this
>may be why the second query appears to run faster.

I thought of this too, but executions times wont change with repeating /
alternating these two tests.

>Also don't be worried if the planner chooses a seq scan for small tables
>as the whole table can often be bought into memory with one IO whereas
>reading the index then the table would be 2 IOs. HTH

That is what I read too and is why Im confused that the index is indeed
executing faster. Can this be a problem with the hardware and/or postgress
installation?

Thanks,
Fabian

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Shridhar Daithankar 2003-07-17 11:18:42 Re: index / sequential scan problem
Previous Message Fabian Kreitner 2003-07-17 11:12:10 Re: index / sequential scan problem