[PERFORM] Which query analiser tools are available?

2006-12-03 Thread Joost Kraaijeveld
Hi, I am struggling with the performance of a JBoss based J2EE application with CMP 2.1. beans and using PostgreSQL as database back-end. Because JBoss is largely responsible for the SQL queries that are send to the back-end , I would like to see the queries that are actually received by

Re: [PERFORM] Which query analiser tools are available?

2006-12-03 Thread Andreas Kretschmer
Joost Kraaijeveld [EMAIL PROTECTED] schrieb: Because JBoss is largely responsible for the SQL queries that are send to the back-end , I would like to see the queries that are actually received by PostgreSQL (insert, select, update and delete), together with the number of times they are called,

Re: [PERFORM] Regex performance issue

2006-12-03 Thread Alexandru Coseru
Hello.. I presumed CPU intensive because: 1) I have no hdd lights turn on during a series of queries (about 50 of them) 2) vmstat doesn't give me blocks in and just a couple of blocks out. 3) top reports between 95 and 100 user cpu.sometimes ,i can see some hi and si work

[PERFORM] Propagating outer join conditions

2006-12-03 Thread Aaron Birkland
The following left outer join plan puzzles me: EXPLAIN ANALYZE SELECT * from t28 LEFT OUTER JOIN (t1 JOIN t11 ON (t11.o = 'http://example.org' AND t11.s = t1.o)) ON t28.s = t1.s WHERE t28.o = 'spec'; t28, t1, and t11 all have indexed columns named 's' and 'o' that contain 'text'; Nested Loop

Re: [PERFORM] Propagating outer join conditions

2006-12-03 Thread Jonathan Blitz
How about trying: Select * From (Select * from t28 where t28.0='spec') t28a Left out join (t1 JOIN t11 ON (t11.o = 'http://example.org' AND t11.s = t1.o)) ON t28a.s = t1.s In this way, I think, the where clause on t28 would be performed before the join rather than after. Jonathan Blitz

Re: [PERFORM] Propagating outer join conditions

2006-12-03 Thread Aaron Birkland
First, I forgot to mention - this is 8.2 RC1 I was trying on The suggested change produces an identical 'bad' query plan. The main issue (I think) is that the query node that processes t1 JOIN t11 ON ..' is not aware of the join condition 't28.s = t1.s'.. even though the value of t28.s (as

[PERFORM] Hardware advice

2006-12-03 Thread Alexandru Coseru
Hello.. I'm waiting for my new system , and meanwhile , i have some questions. First , here are the specs: The server will have kernel 2.1.19 and it will be use only as a postgresql server (nothing else... no named,dhcp,web,mail , etc). Postgresql version will be 8.2. It will be heavily

Re: [PERFORM] Propagating outer join conditions

2006-12-03 Thread Tom Lane
Aaron Birkland [EMAIL PROTECTED] writes: ... Is is possible to generate a plan that looks like this: Nested Loop Left Join (cost=???) - Index Scan using t28_o on t28 (cost=0.00..9.11 rows=1 width=89) Index Cond: (o = 'spec'::text) - Nested Loop (cost=???) -

Re: [PERFORM] Hardware advice

2006-12-03 Thread Josh Berkus
Alexandru, The server will have kernel 2.1.19  and it will be use only as a postgresql Assuming you're talking Linux, I think you mean 2.6.19? -- Josh Berkus PostgreSQL @ Sun San Francisco ---(end of broadcast)--- TIP 2: Don't 'kill -9' the

Re: [PERFORM] Hardware advice

2006-12-03 Thread Alexandru Coseru
Hello.. Yes , sorry for the mistype.. Regards Alex - Original Message - From: Josh Berkus josh@agliodbs.com To: pgsql-performance@postgresql.org Cc: Alexandru Coseru [EMAIL PROTECTED] Sent: Sunday, December 03, 2006 10:11 PM Subject: Re: [PERFORM] Hardware advice Alexandru, The

[PERFORM] Enabling constraint_exclusion does not avoid scanning all child partitions

2006-12-03 Thread Fayza Sultan
I am trying to optimize queries on one of the large table we have by partitioning it. To test it I created a sample script. When I use Explain Analyze on one of the queries the query planer shows sequence scan on all the child partitions instead of only one child containing the required data. I

Re: [PERFORM] Enabling constraint_exclusion does not avoid scanning all child partitions

2006-12-03 Thread Tom Lane
Fayza Sultan [EMAIL PROTECTED] writes: CREATE TABLE parent ( monthdate date NOT NULL, id int4 NOT NULL, CONSTRAINT parent_idx PRIMARY KEY (monthdate,id ) ); CREATE TABLE child1 ( CONSTRAINT child1_idx PRIMARY KEY (monthdate,id), CONSTRAINT child1_chk CHECK (monthdate =

Re: [PERFORM] Enabling constraint_exclusion does not avoid scanning all child partitions

2006-12-03 Thread Fayza Sultan
Your point solved my problem. Thank you -Fayza On 12/4/06, Tom Lane [EMAIL PROTECTED] wrote: Fayza Sultan [EMAIL PROTECTED] writes: CREATE TABLE parent ( monthdate date NOT NULL, id int4 NOT NULL, CONSTRAINT parent_idx PRIMARY KEY (monthdate,id ) ); CREATE TABLE child1 (

[PERFORM] Is Vacuum/analyze destroying my performance?

2006-12-03 Thread Carlo Stonebanks
I have always been frustrated by the wildly erratic performance of our postgresql 8 server. We run aprogram that does heavy data importing via a heuristics-based import program. Sometime records being imported would just fly by, sometimes they would crawl. The import program imports records

Re: [PERFORM] Is Vacuum/analyze destroying my performance?

2006-12-03 Thread Carlo Stonebanks
Update on this issue, I solved my problem by doing the following: 1) Stopped the import, and did a checkpoint backup on my import target schema 2) Dropped the import target schema 3) Restored a backup from a previous checkpoint when the tables were much smaller 4) Performed a VACUUM/ANALYZE on

Re: [PERFORM] Bad iostat numbers

2006-12-03 Thread Greg Smith
On Thu, 30 Nov 2006, Carlos H. Reimer wrote: I would like to discover how much cache is present in the controller, how can I find this value from Linux? As far as I know there is no cache on an Adaptec 39320. The write-back cache Linux was reporting on was the one in the drives, which is

Re: [PERFORM] Bad iostat numbers

2006-12-03 Thread Alex Turner
People recommend LSI MegaRAID controllers on here regularly, but I have found that they do not work that well. I have bonnie++ numbers that show the controller is not performing anywhere near the disk's saturation level in a simple RAID 1 on RedHat Linux EL4 on two seperate machines provided by

[PERFORM] 8.2rc1 (much) slower than 8.2dev?

2006-12-03 Thread Arjen van der Meijden
Hi List, We've been doing some benchmarks lately (one of them made it to the PostgreSQL frontpage) with postgresql 8.2 dev (cvs checkout of 3 june 2006). But we prefer of course to run a more production-like version and installed postgresql 8.2rc1. As it turns out after a dump/restore (to