Re: PostgreSQL OR performance

From: Віталій Тимчишин <tivv00(at)gmail(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL OR performance
Date: 2008-11-15 13:57:03
Message-ID: 331e40660811150557s50e54c54m974645e31e30a612@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

2008/11/7 Richard Huxton <dev(at)archonet(dot)com>

> But it's this materialize that's taking the biggest piece of the time.
>
> > " -> Materialize (cost=469981.13..498937.42 rows=2316503 width=30)
> > (actual time=15915.639..391938.338 rows=242752539 loops=1)"
>
> 15.9 seconds to 391.9 seconds. That's half your time right there. The
> fact that it's ending up with 242 million rows isn't promising - are you
> sure the query is doing what you think it is?

I am not. I can't see how materialize can multiply number of rows it gets
from sort by 100.

>
> > " -> Sort (cost=469981.13..475772.39 rows=2316503 width=30)
> (actual
> > time=15915.599..19920.912 rows=2316503 loops=1)"
> > " Sort Key: production.company.run_id"
> > " Sort Method: external merge Disk: 104896kB"
>
> By constrast, this on-disk sort of 104MB is comparatively fast.
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-11-15 17:07:31 Re: PostgreSQL OR performance
Previous Message Віталій Тимчишин 2008-11-15 13:55:38 Re: PostgreSQL OR performance