On Mon, Jun 10, 2013 at 2:08 PM, Andres Freund <and...@2ndquadrant.com>wrote:
> On 2013-06-10 13:28:32 +0000, Gunnlaugur Thor Briem wrote: > > The three queries taking O(N) time are listed below. AFAICT each of these > > Which of those queries take how long in your case? > They were as follows: duration: 27770.917 ms statement: SELECT c.tableoid, c.oid, c.relname, ... duration: 28133.407 ms statement: SELECT tableoid, oid, typname, ... duration: 55751.996 ms statement: SELECT classid, objid, refclassid, ... However, that was running pg_dump remotely over a slow network, and that may exaggerate durations since it's a bunch of data. So I ran this again locally on the production server: duration: 16012.518 ms statement: SELECT c.tableoid, c.oid, c.relname, ... duration: 16516.708 ms statement: SELECT tableoid, oid, typname, ... duration: 13400.694 ms statement: SELECT classid, objid, refclassid, ... Duration decrease is probably *not* significantly due to a warmer cache, because I had two runs over the slow network and their durations were similar (actually longer the second time). Gulli