Skip site navigation (1) Skip section navigation (2)

Re: SORT performance - slow?

From: Samuel Gendler <sgendler(at)ideasculptor(dot)com>
To: "Strange, John W" <john(dot)w(dot)strange(at)jpmchase(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: SORT performance - slow?
Date: 2011-05-19 21:41:21
Message-ID: BANLkTiniQSV7e-=t5z2+EwH83sWs-8YC4A@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
Plus the entire explain analyze output into the form at
http://explain.depesz.com/ and you'll get a nicely human readable output
which shows both the inclusive and exclusive time spent on each step of the
query.  It also highlights any steps which show inaccurate statistics.  It
will also give you a perma-link which you can use in emails so that everyone
else can see the pretty version, too.



On Thu, May 19, 2011 at 2:13 PM, Strange, John W <
john(dot)w(dot)strange(at)jpmchase(dot)com> wrote:

> Am I reading this right in that the sort is taking almost 8 seconds?
>
>
>
> *"GroupAggregate  (cost=95808.09..95808.14 rows=1 width=142) (actual
> time=14186.999..14694.524 rows=315635 loops=1)"*
>
> "  Output: sq.tag, sq.instrument, s.d1, s.d2, s.d3, s.d4, s.d5, s.d6, s.d7,
> s.d8, s.d9, s.d10, sum(sq.v)"
>
> "  Buffers: shared hit=9763"
>
> *"  ->  Sort  (cost=95808.09..95808.09 rows=1 width=142) (actual
> time=14186.977..14287.068 rows=315635 loops=1)"*
>
> "        Output: sq.tag, sq.instrument, s.d1, s.d2, s.d3, s.d4, s.d5, s.d6,
> s.d7, s.d8, s.d9, s.d10, sq.v"
>
> "        Sort Key: sq.tag, sq.instrument, s.d1, s.d2, s.d3, s.d4, s.d5,
> s.d6, s.d7, s.d8, s.d9, s.d10"
>
> "        Sort Method:  quicksort  Memory: 79808kB"
>
> "        Buffers: shared hit=9763"
>
> *"        ->  Hash Join  (cost=87341.48..95808.08 rows=1 width=142)
> (actual time=6000.728..12037.492 rows=315635 loops=1)"*
>
> "              Output: sq.tag, sq.instrument, s.d1, s.d2, s.d3, s.d4, s.d5,
> s.d6, s.d7, s.d8, s.d9, s.d10, sq.v"
>
> "              Hash Cond: (s.scenarioid = sq.scenarioid)"
>
> "              Buffers: shared hit=9763"
>
>
>
>
>
>
> _______________________________________________________________________________________________
> |* John W. Strange* | Vice President | Global Commodities Technology
> | J.P. Morgan | 700 Louisiana, 11th Floor | T: 713-236-4122 | C:
> 281-744-6476 | F: 713 236-3333
> | john(dot)w(dot)strange(at)jpmchase(dot)com | jpmorgan.com
>
>
>
> This communication is for informational purposes only. It is not intended
> as an offer or solicitation for the purchase or sale of any financial
> instrument or as an official confirmation of any transaction. All market
> prices, data and other information are not warranted as to completeness or
> accuracy and are subject to change without notice. Any comments or
> statements made herein do not necessarily reflect those of JPMorgan Chase &
> Co., its subsidiaries and affiliates. This transmission may contain
> information that is privileged, confidential, legally privileged, and/or
> exempt from disclosure under applicable law. If you are not the intended
> recipient, you are hereby notified that any disclosure, copying,
> distribution, or use of the information contained herein (including any
> reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any
> attachments are believed to be free of any virus or other defect that might
> affect any computer system into which it is received and opened, it is the
> responsibility of the recipient to ensure that it is virus free and no
> responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and
> affiliates, as applicable, for any loss or damage arising in any way from
> its use. If you received this transmission in error, please immediately
> contact the sender and destroy the material in its entirety, whether in
> electronic or hard copy format. Thank you. Please refer to
> http://www.jpmorgan.com/pages/disclosures for disclosures relating to
> European legal entities.
>

In response to

pgsql-performance by date

Next:From: C├ędric VillemainDate: 2011-05-19 22:27:35
Subject: Re: reducing random_page_cost from 4 to 2 to force index scan
Previous:From: Strange, John WDate: 2011-05-19 21:13:30
Subject: SORT performance - slow?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group