Re: Seqscan slowness and stored procedures

From: Ivan Voras <ivoras(at)freebsd(dot)org>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Seqscan slowness and stored procedures
Date: 2012-05-27 15:57:55
Message-ID: CAF-QHFWZC-yz5K5voQqf6Pb1nmoVZ13AH_hq5mgD=uZ0ytNAwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 27 May 2012 05:28, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> Hello
>
> 2012/5/26 Ivan Voras <ivoras(at)freebsd(dot)org>:
>> Hello,
>>
>> I have a SQL function (which I've pasted below) and while testing its
>> code directly (outside a function), this is the "normal", default plan:
>>
>> http://explain.depesz.com/s/vfP (67 ms)
>>
>> and this is the plain with enable_seqscan turned off:
>>
>> http://explain.depesz.com/s/EFP (27 ms)
>>
>> Disabling seqscan results in almost 2.5x faster execution.
>>
>> However, when this code is wrapped in a function, the execution time is
>> closer to the second case (which is great, I'm not complaining):
>>
>
> see http://archives.postgresql.org/pgsql-general/2009-12/msg01189.php

Hi,

Thank you for your answer, but if you read my post, you'll hopefully
realize my questions are different from that in the linked post, and
are not answered by the post.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Pavel Stehule 2012-05-27 16:07:29 Re: Seqscan slowness and stored procedures
Previous Message Hugo <Nabble> 2012-05-27 04:12:13 Re: pg_dump and thousands of schemas