From: | Karim Nassar <karim(dot)nassar(at)acm(dot)org> |
---|---|
To: | Madison Kelly <linux(at)alteeve(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Index ot being used |
Date: | 2005-06-15 16:52:02 |
Message-ID: | 1118854322.7135.133.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Mon, 2005-06-13 at 17:30 -0400, Madison Kelly wrote:
> As I mentioned to Bruno in my reply to him, I am trying to keep as
> many tweaks as I can inside my program. The reason for this is that this
> is a backup program that I am trying to aim to more mainstream users or
> where a techy would set it up and then it would be used by mainstream
> users. At this point I want to avoid, as best I can, any changes from
> default to the 'postgres.conf' file or other external files. Later
> though, once I finish this testing phase, I plan to write a section of
> external tweaking where I will test these changes out and note my
> success for mre advanced users who feel more comfortable playing with
> postgres (and web server, rsync, etc) configs.
>
> If there is any way that I can make changes like this similar from
> inside my (perl) program I would prefer that. For example, I implemented
> the 'enable_seqscan' via:
>
> $DB->do("SET ENABLE_SEQSCAN TO OFF") || die...
> ...
> $DB->do("SET ENABLE_SEQSCAN TO ON") || die...
Your goal is admirable. However, many people tweak their postgresql.conf
files, and your program can't know whether or not this has happened. It
might be a good idea to have a var $do_db_optimization, which defaults
to on. Then, if your users have trouble or are advanced admins they can
turn it off. My personal opinion is that there are too many
architectures and configurations for you to accurately optimize inside
your program, and this gives you and your users an easy out.
if ($do_db_optimization == 1) {
$DB->do("SET ENABLE_SEQSCAN TO OFF") || die...
} else {
# do nothing -- postgresql will figure it out
}
--
Karim Nassar <karim(dot)nassar(at)acm(dot)org>
From | Date | Subject | |
---|---|---|---|
Next Message | Madison Kelly | 2005-06-15 17:33:20 | Re: Index ot being used |
Previous Message | Ken Shaw | 2005-06-15 15:34:18 | How to determine whether to VACUUM or CLUSTER |