From: Sylvain CAILLET <scaillet@alaloop.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Create tables performance
Date: Tue, 10 Jul 2012 08:27:40 +0200 (CEST)
Message-ID: <1629322e-0d80-4d27-941c-13a785c19387@zimbra-ne01.network-studio.com> (raw)
In-Reply-To: <CAMkU=1ybZ-xrfWqWTJVw7LNgALzWbT+aLo6-LgxTBidqdHuUQQ@mail.gmail.com>
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@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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: scaillet@alaloop.com, jeff.janes@gmail.com
Subject: Re: Create tables performance
In-Reply-To: <1629322e-0d80-4d27-941c-13a785c19387@zimbra-ne01.network-studio.com>
References: <CAMkU=1ybZ-xrfWqWTJVw7LNgALzWbT+aLo6-LgxTBidqdHuUQQ@mail.gmail.com> <1629322e-0d80-4d27-941c-13a785c19387@zimbra-ne01.network-studio.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox