Re: [PERFORM] Create tables performance

2012-07-09 Thread Sylvain CAILLET
Yes, you're right ! The process checks if all these tables exist before creating them. So it might be the SELECT that takes time. To check existence, I use the following query : select * from pg_tables where tablename='the_table'; May be it's not the best way. And I launch a query per table ! N

Re: [PERFORM] Create tables performance

2012-07-09 Thread Jeff Janes
On Sun, Jul 8, 2012 at 11:49 PM, Sylvain CAILLET wrote: > Hi, > > Thank you all for your help. > > @Jeff : my daemon creates these tables at start time so it doesn't do > anything else at the same time. The CPU is loaded between 20% and 25%. How does it decide which tables to create? Is it query

Re: [PERFORM] Create tables performance

2012-07-08 Thread Sylvain CAILLET
Hi, Thank you all for your help. @Jeff : my daemon creates these tables at start time so it doesn't do anything else at the same time. The CPU is loaded between 20% and 25%. @Richard : Sure the DB number of table is quite big and sure most of them have the same structure, but it's very har

Re: [PERFORM] Create tables performance

2012-07-06 Thread Craig Ringer
On 07/06/2012 11:15 PM, Sylvain CAILLET wrote: Hi to all, I run Postgresql 8.3.9 on a dedicated server running with Debian 5.0.4, a strong bi quad-proc with RAM 16Go. My biggest db contains at least 100 000 tables. Last time, I started a Java process I use to make some change on it, it create

Re: [PERFORM] Create tables performance

2012-07-06 Thread Richard Huxton
On 06/07/12 16:15, Sylvain CAILLET wrote: Hi to all, I run Postgresql 8.3.9 on a dedicated server running with Debian 5.0.4, a strong bi quad-proc with RAM 16Go. My biggest db contains at least 100 000 tables. That is a *lot* of tables and it's probably going to be slow whatever you do. La

Re: [PERFORM] Create tables performance

2012-07-06 Thread Jeff Janes
On Fri, Jul 6, 2012 at 8:15 AM, Sylvain CAILLET wrote: > Hi to all, > > I run Postgresql 8.3.9 on a dedicated server running with Debian 5.0.4, a > strong bi quad-proc with RAM 16Go. My biggest db contains at least 100 000 > tables. Last time, I started a Java process I use to make some change on

[PERFORM] Create tables performance

2012-07-06 Thread Sylvain CAILLET
Hi to all, I run Postgresql 8.3.9 on a dedicated server running with Debian 5.0.4, a strong bi quad-proc with RAM 16Go. My biggest db contains at least 100 000 tables. Last time, I started a Java process I use to make some change on it, it created 170 new tables and it took one full minute.