Re: [PERFORM] select count(*) performance

2007-08-13 Thread valgog
On Aug 11, 5:54 pm, Detlef Rudolph [EMAIL PROTECTED] wrote: Hello Group, I've tried the VACUUM ANALYSE, that doesn't help much, but VACUUM FULL improves Performance down from about 40 secs to 8. I think in future I would use the reltuples value from pg_class for the table. Thanks a lot for

Re: [PERFORM] Dell Hardware Recommendations

2007-08-13 Thread Vivek Khera
On Aug 10, 2007, at 4:36 PM, Merlin Moncure wrote: I'm not so sure I agree. They are using LSI firmware now (and so is everyone else). The servers are well built (highly subjective, I admit) and configurable. I have had some bad experiences with IBM gear (adaptec controller though), and

Re: [PERFORM] How to ENABLE SQL capturing???

2007-08-13 Thread Jonathan Ellis
On 8/10/07, Joshua D. Drake [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 smiley2211 wrote: Jeff, You are CORRECT...my queries were going to /var/log/messages...had to get the Linux Admin to grant me READ access to the file... You may want to actually get

Re: [PERFORM] Help optimize view

2007-08-13 Thread Relyea, Mike
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Friday, August 10, 2007 5:44 PM To: Relyea, Mike Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Help optimize view Try increasing join_collapse_limit --- you have just enough tables here that the

Re: [PERFORM] How to ENABLE SQL capturing???

2007-08-13 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonathan Ellis wrote: On 8/10/07, Joshua D. Drake [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 smiley2211 wrote: Jeff, You are CORRECT...my queries were going to /var/log/messages...had to get the Linux Admin to

Re: [PERFORM] How to ENABLE SQL capturing???

2007-08-13 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregory Stark wrote: Joshua D. Drake [EMAIL PROTECTED] writes: If I recall correctly, it is because syslog is blocking. Are you sure it isn't just that syslog fsyncs its log files after every log message? Nope I am not sure at all ;). Darcy

Re: [PERFORM] How to ENABLE SQL capturing???

2007-08-13 Thread Gregory Stark
Joshua D. Drake [EMAIL PROTECTED] writes: If I recall correctly, it is because syslog is blocking. Are you sure it isn't just that syslog fsyncs its log files after every log message? I don't think the individual syslogs are synchronous but if syslog falls behind the buffer will fill and

Re: [PERFORM] Help optimize view

2007-08-13 Thread Kevin Grittner
On Mon, Aug 13, 2007 at 10:35 AM, in message [EMAIL PROTECTED], Relyea, Mike [EMAIL PROTECTED] wrote: I'm running 8.2.4 on Windows XP with 1.5 GB memory. shared_buffers = 12288 effective_cache_size = 1 For starters, you might want to adjust one or both of these. It looks to me like

Re: [PERFORM] Help optimize view

2007-08-13 Thread Relyea, Mike
On Mon, Aug 13, 2007 at 10:35 AM, in message [EMAIL PROTECTED] .net, Relyea, Mike [EMAIL PROTECTED] wrote: I'm running 8.2.4 on Windows XP with 1.5 GB memory. shared_buffers = 12288 effective_cache_size = 1 For starters, you might want to adjust one or both of these. It looks

[PERFORM] Proposal: Pluggable Optimizer Interface

2007-08-13 Thread Julius Stroffek
Hi All, Tomas Kovarik and I have presented at PGCon 2007 in Ottawa the ideas about other possible optimizer algorithms to be used in PostgreSQL. We are quite new to PostgreSQL project so it took us some time to go through the sources end explore the possibilities how things could be

Re: [PERFORM] Help optimize view

2007-08-13 Thread Kevin Grittner
On Mon, Aug 13, 2007 at 1:48 PM, in message [EMAIL PROTECTED], Relyea, Mike [EMAIL PROTECTED] wrote: I've increased shared_buffers to 128MB, and restarted the server. My total run time didn't really change. Please forgive me if this guess doesn't help either, but could you try eliminating

Re: [PERFORM] Help optimize view

2007-08-13 Thread Tom Lane
Relyea, Mike [EMAIL PROTECTED] writes: I've increased shared_buffers to 128MB, and restarted the server. My total run time didn't really change. It doesn't look like you can hope for much in terms of improving the plan. The bulk of the time is going into scanning ParameterValues and

Re: [PERFORM] [HACKERS] Proposal: Pluggable Optimizer Interface

2007-08-13 Thread Stefan Kaltenbrunner
Julius Stroffek wrote: Hi All, Tomas Kovarik and I have presented at PGCon 2007 in Ottawa the ideas about other possible optimizer algorithms to be used in PostgreSQL. We are quite new to PostgreSQL project so it took us some time to go through the sources end explore the possibilities

[PERFORM] Stable function optimisation

2007-08-13 Thread Philipp Specht
Hello! Here's my test database: # table CREATE TABLE public.t ( id integer NOT NULL, a integer NOT NULL, CONSTRAINT pk_t PRIMARY KEY (id) ) CREATE INDEX idx_t_a ON public.t USING btree (a); # function CREATE OR REPLACE FUNCTION public.f() RETURNS integer AS $BODY$BEGIN

Re: [PERFORM] Help optimize view

2007-08-13 Thread Relyea, Mike
On Mon, Aug 13, 2007 at 1:48 PM, in message [EMAIL PROTECTED] .net, Relyea, Mike [EMAIL PROTECTED] wrote: I've increased shared_buffers to 128MB, and restarted the server. My total run time didn't really change. Please forgive me if this guess doesn't help either, but could you

Re: [PERFORM] Stable function optimisation

2007-08-13 Thread Tom Lane
Philipp Specht [EMAIL PROTECTED] writes: The biggest question here is: Why is the runtime of the query with the stable function not near the runtime of the immutable function? Stable functions don't get folded to constants. It's definitely one query and the manual states that a stable

Re: [PERFORM] [HACKERS] Proposal: Pluggable Optimizer Interface

2007-08-13 Thread Tom Lane
Stefan Kaltenbrunner [EMAIL PROTECTED] writes: Julius Stroffek wrote: There is a proposal attached to this mail about the interface we would like to implement for switching between different optimizers. Please review it and provide a feedback to us. hmm - how does is that proposal different

Re: [PERFORM] Help optimize view

2007-08-13 Thread Kevin Grittner
On Mon, Aug 13, 2007 at 4:00 PM, in message [EMAIL PROTECTED], Relyea, Mike [EMAIL PROTECTED] wrote: Re-writing the view like this maybe bought me something. Tough to tell because I also increased some of the statistics. I don't know whether it was the finer-grained statistics or the

Re: [PERFORM] [HACKERS] Proposal: Pluggable Optimizer Interface

2007-08-13 Thread Julius Stroffek
Stefan, thanks for pointing this out. I missed this change. We would like to place the hooks to a different place in the planner and we would like to just replace the non-deterministic algorithm searching for the best order of joins and keep the rest of the planner untouched. I am not quite

Re: [PERFORM] Performance on writable views

2007-08-13 Thread Jim Nasby
On Aug 11, 2007, at 8:58 AM, Joshua D. Drake wrote: Heikki Linnakangas wrote: Enrico Weigelt wrote: I'm often using writable views as interfaces to clients, so they only see virtual objects and never have to cope with the actual storage, ie. to give some client an totally denormalized view of

Re: [PERFORM] [HACKERS] Proposal: Pluggable Optimizer Interface

2007-08-13 Thread Tom Lane
Julius Stroffek [EMAIL PROTECTED] writes: I understood that if the user creates his own implementation of the planner which can be stored in some external library, he have to provide some C language function as a hook activator which will assign the desired value to the planner_hook

Re: [PERFORM] Help optimize view

2007-08-13 Thread Kevin Grittner
On Mon, Aug 13, 2007 at 4:25 PM, in message [EMAIL PROTECTED], Kevin Grittner [EMAIL PROTECTED] wrote: On Mon, Aug 13, 2007 at 4:00 PM, in message [EMAIL PROTECTED], Relyea, Mike [EMAIL PROTECTED] wrote: From what Tom says, it sounds like if I want the data returned faster I'm likely

Re: [PERFORM] [HACKERS] Proposal: Pluggable Optimizer Interface

2007-08-13 Thread Josh Berkus
Tom, Also, while we might accept a small hook-function patch for 8.3, there's zero chance of any of that other stuff making it into this release cycle. I don't think anyone was thinking about 8.3. This is pretty much 8.4 stuff; Julius is just raising it now becuase they don't want to go

Re: [PERFORM] [HACKERS] Proposal: Pluggable Optimizer Interface

2007-08-13 Thread Tom Lane
Josh Berkus [EMAIL PROTECTED] writes: Tom, Also, while we might accept a small hook-function patch for 8.3, there's zero chance of any of that other stuff making it into this release cycle. I don't think anyone was thinking about 8.3. This is pretty much 8.4 stuff; Julius is just raising

Re: [PERFORM] Dell Hardware Recommendations

2007-08-13 Thread Dave Cramer
On 13-Aug-07, at 9:50 AM, Vivek Khera wrote: On Aug 10, 2007, at 4:36 PM, Merlin Moncure wrote: I'm not so sure I agree. They are using LSI firmware now (and so is everyone else). The servers are well built (highly subjective, I admit) and configurable. I have had some bad experiences