pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Віталій Тимчишин <tivv00@gmail.com>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL OR performance
Date: Sat, 15 Nov 2008 15:57:03 +0200
Message-ID: <331e40660811150557s50e54c54m974645e31e30a612@mail.gmail.com> (raw )
In-Reply-To: <49141C5E.2010404@archonet.com >
References: <331e40660811050312u552cab53ifa88e493e1c4f7ac@mail.gmail.com >
<1225902700.1432.53.camel@jdavis >
<331e40660811060246m51df553egd4e2ba91f08d1434@mail.gmail.com >
<29e3942f0811060426k5fe34b1av401a2dba62e4ae3c@mail.gmail.com >
<331e40660811060833l49bf837em41ca88d4b2061ea1@mail.gmail.com >
<49131ED5.80307@archonet.com >
<331e40660811060937q460e6f9fvf336455200d31f56@mail.gmail.com >
<331e40660811070114rd70cf0dy194020a9f9ea8802@mail.gmail.com >
<49141C5E.2010404@archonet.com >
2008/11/7 Richard Huxton <dev@archonet.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.
>
view thread (16+ messages) latest in thread
Message-ID: <331e40660811150557s50e54c54m974645e31e30a612@mail.gmail.com>
Permalink: ../331e40660811150557s50e54c54m974645e31e30a612@mail.gmail.com/
Also on: postgresql.org/message-id/331e40660811150557s50e54c54m974645e31e30a612@mail.gmail.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tivv00@gmail.com, dev@archonet.com
Subject: Re: PostgreSQL OR performance
In-Reply-To: <331e40660811150557s50e54c54m974645e31e30a612@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox