[PERFORM] view of view

2005-12-07 Thread Keith Worthington
Hi All, I am working on an application that uses PostgreSQL. One of the functions of the application is to generate reports. In order to keep the code in the application simple we create a view of the required data in the database and then simply execute a SELECT * FROM view_of_the_data; A

Re: [PERFORM] How can I speed up this function?

2005-06-27 Thread Keith Worthington
David Mitchell wrote: We have the following function in our home grown mirroring package, but it isn't running as fast as we would like. We need to select statements from the pending_statement table, and we want to select all the statements for a single transaction (pending_trans) in one go (th

Re: [PERFORM] Performance Tuning Article

2005-06-23 Thread Keith Worthington
Radu-Adrian Popescu wrote: There have been problems with Xeon processors. Can you elaborate on that please ? Thanks, Not really as I do not understand the issue. Here is one post from the archives. http://archives.postgresql.org/pgsql-performance/2005-05/msg00441.php If you search the ar

Re: [PERFORM] Performance Tuning Article

2005-06-22 Thread Keith Worthington
I've put together a short article and posted it online regarding performance tuning PostgreSQL in general. I believe it helps to bring together the info in a easy to digest manner. I would appreciate any feedback, comments, and especially any technical corrections. Looks nice. You shoul

Re: [PERFORM] Moving pg_xlog

2005-06-01 Thread Keith Worthington
On Wed, 01 Jun 2005 12:19:40 -0400, Tom Lane wrote > "Keith Worthington" <[EMAIL PROTECTED]> writes: > > I have been reading about increasing PostgreSQL performance > > by relocating the pg_xlog to a disk other than the one > > where the database resides. I

[PERFORM] Moving pg_xlog

2005-06-01 Thread Keith Worthington
Hi All, I have been reading about increasing PostgreSQL performance by relocating the pg_xlog to a disk other than the one where the database resides. I have the following pg_xlogs on my system. /raid02/databases/pg_xlog /raid02/rhdb_databases/pg_xlog /raid02/databases-8.0.0/pg_xlog /var/lib/pgs

Re: [PERFORM] COPY vs INSERT

2005-05-05 Thread Keith Worthington
Christopher Petrilli wrote: On 5/4/05, Mischa Sandberg <[EMAIL PROTECTED]> wrote: Quoting David Roussel <[EMAIL PROTECTED]>: COPY invokes all the same logic as INSERT on the server side (rowexclusive locking, transaction log, updating indexes, rules). The difference is that all the rows are insert

Re: [PERFORM] 4 way JOIN using aliases

2005-04-12 Thread Keith Worthington
On Tue, 12 Apr 2005 08:41:55 -0500, Dave Held wrote > > -Original Message- > > From: Keith Worthington [mailto:[EMAIL PROTECTED] > > Sent: Monday, April 11, 2005 7:44 PM > > To: Neil Conway > > Cc: PostgreSQL Perform > > Subject: Re: [PERFORM] 4 way JOI

Re: [PERFORM] 4 way JOIN using aliases

2005-04-11 Thread Keith Worthington
Neil Conway wrote: Keith Worthington wrote: -> Seq Scan on tbl_current (cost=0.00..1775.57 rows=76457 width=31) (actual time=22.870..25.024 rows=605 loops=1) This rowcount is way off -- have you run ANALYZE recently? -Neil ---(end of broadc

Re: [PERFORM] Any way to speed this up?

2005-04-07 Thread Keith Worthington
On Thu, 07 Apr 2005 11:13:57 -0400, Joel Fradkin wrote [snip] > " -> Sort (cost=393.76..394.61 rows=338 width=48) (actual > time=62.000..62.000 rows=441 loops=1)" > > "Sort Key: l.locationid" > > "-> Index Scan using ix_location on tbllocation l > > (cost=0.00..379.56 rows=33

[PERFORM] 4 way JOIN using aliases

2005-04-07 Thread Keith Worthington
Hi All, Thanks to all on the NOVICE list that gave me help I now have a query running that returns the results I am after. :-) Now of course I want it to run faster. Currently it clocks in at ~160ms. I have checked over the indexes and I belive that the tables are indexed properly. The largest

[PERFORM] Triggers with FOR EACH STATEMENT

2005-04-01 Thread Keith Worthington
Hi All, I have a trigger function that copies data from an input table to a table in the actual data model. The data model table has a trigger after update on it. Is the first trigger fired after the copy terminates or after each insert? Is the second trigger fired after the first trigger is com

[PERFORM] Dynamic query perormance

2005-03-30 Thread Keith Worthington
Hi All, I am developing a simple set returning function as my first step towards more complicated processes. I would like to understand the implications of using the dynamic query capability. I have built two forms of an identically performing function. The first uses a simple IF-THEN-ELSIF-THE

[PERFORM] View vs function

2005-03-20 Thread Keith Worthington
Hi All, I have been reading about set returning functions. What I would like to know is is there a performance advantage in using SRFs versus querying a view. Assuming the underlying SQL is the same for the view vs the function except for the WHERE clause which of these would you expect to be