Re: Is there something wrong with my test case?

From: Fabio Pardi <f(dot)pardi(at)portavita(dot)eu>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Is there something wrong with my test case?
Date: 2019-01-07 10:53:40
Message-ID: 51d65211-7463-9d19-0a48-b6794569b160@portavita.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Thiemo,

On 07/01/2019 11:30, Thiemo Kellner wrote:
>
> Hi HP
>
> Thanks for your reply.
>
> Quoting "Peter J. Holzer" <hjp-pgsql(at)hjp(dot)at>:
>
>> On 2018-12-25 11:54:11 +0000, Thiemo Kellner wrote:
>> [three different but functionally equivalent queries]
>>
>>> Explain analyze verbose showed for:
>>> A (cost=264.72..626.97 rows=31 width=90) (actual time=1.117..1.117 rows=0
>>> loops=1)
>>> C (cost=0.42..611.19 rows=31 width=52) (actual time=2.217..2.217 rows=0
>>> loops=1)
>>
>> 626.97 doesn't seem "much higher" to me than 611.19. I would call that
>> "about the same".
>>
>
> So would I but the cost is given as a range. Taking the the average somewhat 400 compare to somewhat 300. I do not know whether averaging is appropriate here.

The cost is not a range. The 2 numbers you see are:

*

Estimated start-up cost. This is the time expended before the output phase can begin, e.g., time to do the sorting in a sort node.

* Estimated total cost. This is stated on the assumption that the plan node is run to completion, i.e., all available rows are retrieved. In practice a node's parent node might stop short of reading all available rows (see the LIMIT example below).

As you can read here:

https://www.postgresql.org/docs/current/using-explain.html

regards,

fabio pardi

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thiemo Kellner 2019-01-07 12:06:44 Re: Is there something wrong with my test case?
Previous Message Thiemo Kellner 2019-01-07 10:43:42 Re: Is there something wrong with my test case?