Re: Create tables performance - Mailing list pgsql-performance

From Sylvain CAILLET
Subject Re: Create tables performance
Date
Msg-id 1629322e-0d80-4d27-941c-13a785c19387@zimbra-ne01.network-studio.com
Whole thread Raw
In response to Re: Create tables performance  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-performance
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 ! Not good at all.

Thank you all, I will optimize this.

Sylvain


On Sun, Jul 8, 2012 at 11:49 PM, Sylvain CAILLET <scaillet@alaloop.com> 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 querying the
existing tables to figure out what new ones to make?  Is the rest of
the time going to IO wait?

Cheers,

Jeff

pgsql-performance by date:

Previous
From: David Kerr
Date:
Subject: Re: Massive I/O spikes during checkpoint
Next
From: Pena Kupen
Date:
Subject: Custom function in where clause