pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rural Hunter <ruralhunter@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Very slow planning performance on partition table
Date: Fri, 25 Jul 2014 22:23:49 +0800
Message-ID: <53D26875.2080604@gmail.com> (raw)
In-Reply-To: <25010.1406253203@sss.pgh.pa.us>
References: <53CFB6BC.4050606@gmail.com>
	<25010.1406253203@sss.pgh.pa.us>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

在 2014/7/25 9:53, Tom Lane 写道:
> [ shrug... ] Insufficient data. When I try a simple test case based on 
> what you've told us, I get planning times of a couple of milliseconds. 
> I can think of contributing factors that would increase that, but not 
> by four orders of magnitude. So there's something very significant 
> that you've left out. Can you construct a self-contained test case 
> that's this slow? regards, tom lane 

I run dbg on the backend process and got this:
(gdb) bt
#0  0x00007fc4a1b6cdb7 in semop () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00000000005f8703 in PGSemaphoreLock ()
#2  0x0000000000636703 in LWLockAcquire ()
#3  0x0000000000632eb3 in LockAcquireExtended ()
#4  0x000000000062fdfb in LockRelationOid ()
#5  0x0000000000474e55 in relation_open ()
#6  0x000000000047b39b in index_open ()
#7  0x00000000005f3c22 in get_relation_info ()
#8  0x00000000005f6590 in build_simple_rel ()
#9  0x00000000005f65db in build_simple_rel ()
#10 0x00000000005de8c0 in add_base_rels_to_query ()
#11 0x00000000005df352 in query_planner ()
#12 0x00000000005e0d51 in grouping_planner ()
#13 0x00000000005e2bbe in subquery_planner ()
#14 0x00000000005e2ef9 in standard_planner ()
#15 0x00000000006426e1 in pg_plan_query ()
#16 0x000000000064279e in pg_plan_queries ()
#17 0x00000000006f4b7a in BuildCachedPlan ()
#18 0x00000000006f4e1e in GetCachedPlan ()
#19 0x0000000000642259 in exec_bind_message ()
#20 0x0000000000643561 in PostgresMain ()
#21 0x000000000060347f in ServerLoop ()
#22 0x0000000000604121 in PostmasterMain ()
#23 0x00000000005a5ade in main ()

Does that indicate something? seems it's waiting for some lock.



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (21+ messages)  latest in thread

Message-ID: <53D26875.2080604@gmail.com>
Permalink:  ../53D26875.2080604@gmail.com/
Also on:    postgresql.org/message-id/53D26875.2080604@gmail.com

 · 

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: ruralhunter@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Very slow planning performance on partition table
  In-Reply-To: <53D26875.2080604@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