Re: [BUGS] pg_dump is O(N) in DB table count N even if dumping only one table

2013-06-10 Thread Gunnlaugur Thor Briem
On Mon, Jun 10, 2013 at 2:38 PM, Andres Freund wrote: > Hm. 13s for pg_depend locally vs 55s remotely. You need to have a > tremendous amount of dependencies. > Could you do a count(*) of pg_depend, pg_type and pg_class? > Yep, there's rather a lot: select count(*) from pg_depend; 7692365 sele

Re: [BUGS] pg_dump is O(N) in DB table count N even if dumping only one table

2013-06-10 Thread Gunnlaugur Thor Briem
On Mon, Jun 10, 2013 at 2:08 PM, Andres Freund 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: dura

Re: [BUGS] pg_dump is O(N) in DB table count N even if dumping only one table

2013-06-10 Thread Gunnlaugur Thor Briem
bug. Is that note then outdated/incorrect? Or am I mistaken in finding it at odds with your explanation? Regards, Gulli On Mon, Jun 10, 2013 at 2:04 PM, Tom Lane wrote: > Gunnlaugur Thor Briem writes: > > pg_dump takes O(N) time dumping just one table (or a few) explicitly >

[BUGS] pg_dump is O(N) in DB table count N even if dumping only one table

2013-06-10 Thread Gunnlaugur Thor Briem
Hi, pg_dump takes O(N) time dumping just one table (or a few) explicitly specified with a -t parameter. It thus becomes painfully slow on a database with very many tables. (The use case is copying a few tables over to a test DB, from a large production data warehouse.) The three queries taking O