Locate your postgresql.conf
locate postgresql.conf
Assuming you are a highly skilled super user who fully understands and is responsible for all configuration changes s/he makes, edit postgresql.conf
vi postgresql.conf
Find the section with the log_min_duration_statement option:
/log_min_duration_statement
For the purpose of finding out what to improve, I set mine like this:
log_min_duration_statement = 250 # -1 is disabled, 0 logs all statements
# and their durations, in milliseconds.
A reload is all that is necessary to cause pg to use the new duration - at least after uncommenting the line. I used restart a few times and then successfully tried reload.
Since I am using Debian:
/etc/init.d/postgresql-8.1 reload
My postgresql logs are here:
tail -f /var/log/postgresql/postgresql-8.1-main.log
After finding and fixing some long running queries, be sure to edit your postgresql.conf again and set the
log_min_duration_statement = -1
to turn off the function. Just commenting pg conf file settings out does not guarantee they will return to default, according to pg references I have read.
Be sure to reload and tail the log file to ensure that settings are back to performance mode.
See Power PostgreSQL website for more performance tuning info.
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
|
Search
Recent Photos
Recent Visitors
Cristian - Thu 19 Feb 2009 01:10 AM PST
April Lorenzen - Fri 11 Apr 2008 08:31 AM PDT
kitchen - Wed 23 May 2007 11:00 PM PDT
Al Turtle - Fri 24 Mar 2006 04:52 PM PST
Lelain - Sun 19 Feb 2006 10:17 PM PST
Recent Entries
Recent Comments
This Month
Month Archive
Login
|
Friday, May 5
by
April Lorenzen
on Fri 05 May 2006 05:23 PM PDT
Friday, April 7
by
April Lorenzen
on Fri 07 Apr 2006 03:40 PM EDT
I use Cold Fusion to loop over a distinct query for the table that contains the duplicates. Note that your table needs to have OIDs, or a unique primary key.
column_a is the key field I want to eliminate duplicates on SELECT distinct column_a FROM table_a; CFLOOP over the above query - query_a DELETE FROM table_a WHERE column_a = #query_a.column_a# AND OID < ( SELECT OID FROM table_a WHERE column_a = #query_a.column_a# ORDER BY OID DESC LIMIT 1 ); /CFLOOP Friday, March 24
by
April Lorenzen
on Fri 24 Mar 2006 04:43 PM PST
Many Internet access ISPs now block port 25. To access an outbound server other than your access ISPs, you can ... more »
Sunday, November 6
by
April Lorenzen
on Sun 06 Nov 2005 09:55 AM EST
As a computer consultant I advise many of my business clients also on
their home computers, and some have software ... more »
Sunday, July 31
by
April Lorenzen
on Sun 31 Jul 2005 09:52 AM EDT
If you get logged out of webmail - you can now log back in and click the Compose link to restore your work:
![]() Click the OK button and the text you had typed so far will be restored. more » Wednesday, July 13
by
April Lorenzen
on Wed 13 Jul 2005 08:30 AM EDT
Setting aside the blogging/journalling features, Blogware is quite a nice CMS (Content Management System) for websites. CMS usually cost thousands, ... more »
Sunday, July 10
by
April Lorenzen
on Sun 10 Jul 2005 04:42 PM EDT
Your site visitors can just click on the attachment to hear your MP3.
However, if they use ipodder software - they will automatically get your new podcasts when you add them to your site. Their software checks for new recordings at scheduled intervals and automatically downloads your podcast and adds it to their playlist. more »
Monday, July 4
by
April Lorenzen
on Tue 05 Jul 2005 12:47 AM EDT
If you see a color and style you like on this page just click the radio button next to it and then click Change at the bottom of the page. If you prefer to put in your own color directly, read on. more »
Monday, June 13
by
April Lorenzen
on Mon 13 Jun 2005 12:35 PM EDT
Email signatures are a great subtle form of advertising, bringing you new business through personal networking. People who correspond with you usually need your web address, phone fax and mailing address, so it also saves a lot of typing. more »
Wednesday, June 8
by
April Lorenzen
on Wed 08 Jun 2005 02:32 PM EDT
Written for a user who asked for a way to get his mail from multiple computers, home and travelling. Often ... more »
by
April Lorenzen
on Wed 08 Jun 2005 12:30 PM EDT
Written for the novice, this article details three steps - 1. upload the PDF, 2. discover and copy the web address of the PDF, 3. create a hyperlink. Tips on avoiding common mistakes in naming files as well entre to the secret world of A HREF for non-programmers. more »
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
