Re: Is there something wrong with my test case? - Mailing list pgsql-general

From Fabio Pardi
Subject Re: Is there something wrong with my test case?
Date
Msg-id 51d65211-7463-9d19-0a48-b6794569b160@portavita.eu
Whole thread Raw
In response to Re: Is there something wrong with my test case?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Responses Re: Is there something wrong with my test case?  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
List 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@hjp.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


pgsql-general by date:

Previous
From: Thiemo Kellner
Date:
Subject: Re: Is there something wrong with my test case?
Next
From: Thiemo Kellner
Date:
Subject: Re: Is there something wrong with my test case?