Re: High inserting by syslog

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Valter Douglas Lisbôa "Jr(dot)" <douglas(at)trenix(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: High inserting by syslog
Date: 2008-07-03 16:03:49
Message-ID: 1215101029.6936.14.camel@jd-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2008-07-03 at 12:05 -0300, Valter Douglas Lisbôa Jr. wrote:
> Hello all, I have a perl script thats load a entire day squid log to a
> postgres table. I run it at midnight by cronjob and turns off the indexes
> before do it (turning it on after). The script works fine, but I want to
> change this to a diferent approach.

Exactly how do you turn off the indexes?

>
> I'd like to insert on the fly the log lines, so long it be generated to have
> the data on-line. But the table has some indexes and the load of lines is
> about 300.000/day, so the average inserting is 3,48/sec. I think this could
> overload the database server (i did not test yet), so if I want to create a
> no indexed table to receive the on-line inserting and do a job moving all
> lines to the main indexed table at midnight.
>
> My question is, Does exists a better solution, or this tatic is a good way to
> do this?

300,000 inserts a day isn't that much for any reasonable server.

Sincerely,

Joshua D. Drake

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2008-07-03 16:08:26 Re: High inserting by syslog
Previous Message Sam Mason 2008-07-03 16:00:31 Re: Functional index adding one