Re: Is there something wrong with my test case?
От | Fabio Pardi |
---|---|
Тема | Re: Is there something wrong with my test case? |
Дата | |
Msg-id | 51d65211-7463-9d19-0a48-b6794569b160@portavita.eu обсуждение исходный текст |
Ответ на | Re: Is there something wrong with my test case? (Thiemo Kellner <thiemo@gelassene-pferde.biz>) |
Ответы |
Re: Is there something wrong with my test case?
|
Список | pgsql-general |
Hi Thiemo,
The cost is not a range. The 2 numbers you see are:
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 по дате отправления: