Re: SORT performance - slow?

From: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: SORT performance - slow?
Date: 2011-05-23 17:01:42
Message-ID: BANLkTi=g+xaY_2cWqPCBS5=aKdHtfOWsVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> You're probably reading it wrong. The sort itself takes about 1 ms (just
> subtract the numbers in "actual=").

I thought it was cost=startup_cost..total_cost. That is not quite the
same thing, since startup_cost is effectively "cost to produce first
row", and Sort can't really operate in a "streaming" fashion (well,
theoretically, something like selection sort could, but that's beside
the point) so it needs to do all the work up front. I'm no explain
expert, so someone please correct me if I'm wrong.

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2011-05-23 17:19:48 Re: FW: KVP table vs. hstore - hstore performance (Was: Postgres NoSQL emulation)
Previous Message Dave Johansen 2011-05-23 15:54:52 Re: Pushing LIMIT into sub-queries of a UNION ALL?