Re: Create tables performance

From: Sylvain CAILLET <scaillet(at)alaloop(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Create tables performance
Date: 2012-07-10 06:27:40
Message-ID: 1629322e-0d80-4d27-941c-13a785c19387@zimbra-ne01.network-studio.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

----- Mail original -----

> On Sun, Jul 8, 2012 at 11:49 PM, Sylvain CAILLET
> <scaillet(at)alaloop(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Sreejith Balakrishnan 2012-07-10 08:21:06 Any tool/script available which can be used to measure scalability of an application's database.
Previous Message David Kerr 2012-07-10 06:17:48 Re: Massive I/O spikes during checkpoint