Re: [PERFORM] When/if to Reindex

2007-08-23 Thread Gregory Stark
"Steven Flatt" <[EMAIL PROTECTED]> writes: > On 8/22/07, Gregory Stark <[EMAIL PROTECTED]> wrote: > > Interestingly enough, the example you've given does not work for me either. > The select count(*) from test blocks until the reindex completes. Are we > using the same pg version? I was using CV

Re: [PERFORM] When/if to Reindex

2007-08-23 Thread Mark Kirkwood
Tom Lane wrote: The fly in the ointment is that after collecting the pg_index definition of the index, plancat.c also wants to know how big it is --- it calls RelationGetNumberOfBlocks. And that absolutely does look at the physical storage, which means it absolutely is unsafe to do in parallel

Re: [PERFORM] When/if to Reindex

2007-08-23 Thread Tom Lane
"Steven Flatt" <[EMAIL PROTECTED]> writes: > Interestingly enough, the example you've given does not work for me either. > The select count(*) from test blocks until the reindex completes. Are we > using the same pg version? Seems like a fair question, because Greg's example blocks for me too, in

Re: [PERFORM] Optimising "in" queries

2007-08-23 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Stephen Davies wrote: >> While superficially equivalent, I have always believed that IN (a,b,c) >> executed faster than =a or =b or =c. Am I wrong for PostgreSQL? > Older versions of Postgres translated IN (a, b, c) into an OR'ed list of > equalities.

Re: [PERFORM] When/if to Reindex

2007-08-23 Thread Steven Flatt
On 8/22/07, Gregory Stark <[EMAIL PROTECTED]> wrote: > postgres=# create table test (i integer); > CREATE TABLE > postgres=# insert into test select generate_series(1,1000); > INSERT 0 1000 > postgres=# create or replace function slow(integer) returns integer as > 'begin perform pg_sleep(0); retur

Re: [PERFORM] Raid Configurations

2007-08-23 Thread Decibel!
On Aug 17, 2007, at 6:55 PM, Merlin Moncure wrote: So, I'd be looking at a large raid 10 and 1-2 drives for the WAL...on a raid 1. If your system supports two controllers (in either active/active or active/passive), you should look at second controller as well. If you only have one controller,

Re: [PERFORM] Optimising "in" queries

2007-08-23 Thread Alvaro Herrera
Stephen Davies wrote: > Interesting semantics. I have never seen the IN syntax referred to as > "array processing" before. > > I have always thought of array processing as the thing that vector > processors such as Cray and ETA do/did. > > While superficially equivalent, I have always believed

Re: [PERFORM] long-running query - needs tuning

2007-08-23 Thread Tom Lane
Kevin Kempter <[EMAIL PROTECTED]> writes: > Merge Join (cost=17118858.51..17727442.30 rows=155 width=90) >Merge Cond: ("outer".customer_id = "inner".customer_id) >-> GroupAggregate (cost=17118772.93..17727347.34 rows=155 width=8) > -> Sort (cost=17118772.93..17270915.95 rows=

Re: [PERFORM] deadlock_timeout parameter in Postgresql.cof

2007-08-23 Thread Bill Moran
In response to "Sachchida Ojha" <[EMAIL PROTECTED]>: > I am having some dead locking problem with my app system. Our dev are > debugging the app to find out the cause of the problem. In the mean time > I looked at postgresql.conf file. I found that there is a parameter in > postgresql.conf file de

[PERFORM] deadlock_timeout parameter in Postgresql.cof

2007-08-23 Thread Sachchida Ojha
I am having some dead locking problem with my app system. Our dev are debugging the app to find out the cause of the problem. In the mean time I looked at postgresql.conf file. I found that there is a parameter in postgresql.conf file deadlock_timeout which was set 1000 (ms). Normally I see deadlo

[PERFORM] deadlock_timeout parameter in Postgresql.cof

2007-08-23 Thread Sachchida Ojha
I am having some dead locking problem with my app system. Our dev are debugging the app to find out the cause of the problem. In the mean time I looked at postgresql.conf file. I found that there is a parameter in postgresql.conf file deadlock_timeout which was set 1000 (ms). Normally I see deadlo

Re: [PERFORM] Optimising "in" queries

2007-08-23 Thread Stephen Davies
Interesting semantics. I have never seen the IN syntax referred to as "array processing" before. I have always thought of array processing as the thing that vector processors such as Cray and ETA do/did. While superficially equivalent, I have always believed that IN (a,b,c) executed faster th

Re: [PERFORM] Installing PostgreSQL

2007-08-23 Thread Campbell, Lance
Richard, I was able to prove that it works. Thanks for your time. Lance Campbell Project Manager/Software Architect Web Services at Public Affairs University of Illinois 217.333.0382 http://webservices.uiuc.edu -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Th

Re: [PERFORM] Installing PostgreSQL

2007-08-23 Thread Richard Huxton
Campbell, Lance wrote: Richard, So what you are saying is that if you install PostgeSQL into a data directory /abc/data you could then stop the database, move the files into /def/data, and then start the database making sure to point to the new data directory. PostgreSQL is therefore referencing

Re: [PERFORM] Installing PostgreSQL

2007-08-23 Thread Greg Smith
On Thu, 23 Aug 2007, Campbell, Lance wrote: Should installation questions be sent here or to the admin listserv? admin or general would be more appropriate for this type of question. The directory is called pgsql_data. The directory is more than a regular directory. It contains a subdirect

Re: [PERFORM] Installing PostgreSQL

2007-08-23 Thread Campbell, Lance
Richard, So what you are saying is that if you install PostgeSQL into a data directory /abc/data you could then stop the database, move the files into /def/data, and then start the database making sure to point to the new data directory. PostgreSQL is therefore referencing its files relative to th

[PERFORM] long-running query - needs tuning

2007-08-23 Thread Kevin Kempter
Hi List; I've just started working with a new client and they have amoung other issues with their databases a particular update that basically locks out users. The below query was running for over 6 hours this morning and the CPU load had climbed to a point where new connections simply hung wa

Re: [PERFORM] Installing PostgreSQL

2007-08-23 Thread Richard Huxton
Campbell, Lance wrote: Should installation questions be sent here or to the admin listserv? Probably the pgsql-general/admin/novice lists OS: redhat linux RHES? Version of PostgreSQL: 8.2.4 OK I had a group that now manages our server set up a directory/partition for us to put postgre

Re: [PERFORM] io storm on checkpoints, postgresql 8.2.4, linux

2007-08-23 Thread Greg Smith
On Thu, 23 Aug 2007, Dmitry Potapov wrote: I'm planning to do so, but before I need to take a look at postgresql source and dev documentation to find how exactly IO is done, to be able to explain the issue to linux kernel people. I can speed that up for you. http://developer.postgresql.org/in

[PERFORM] Installing PostgreSQL

2007-08-23 Thread Campbell, Lance
Should installation questions be sent here or to the admin listserv? OS: redhat linux Version of PostgreSQL: 8.2.4 I had a group that now manages our server set up a directory/partition for us to put postgreSQL into. The directory is called pgsql_data. The directory is more than a regula

Re: [PERFORM] io storm on checkpoints, postgresql 8.2.4, linux

2007-08-23 Thread Dmitry Potapov
2007/8/23, Greg Smith <[EMAIL PROTECTED]>: > > On Wed, 22 Aug 2007, Dmitry Potapov wrote: > > If you do end up following up with this via the Linux kernel mailing list, > please pass that link along. I've been meaning to submit it to them and > wait for the flood of e-mail telling me what I screwe

[PERFORM] asynchronous commit feature

2007-08-23 Thread Merlin Moncure
I'm testing the new asynch commit feature on various raid configurations and my early findings is that it reduces the impact of keeping wal and data on the same volume. I have 10 disks to play with, and am finding that it's faster to do a 10 drive raid 10 rather than 8 drive raid 10 + two drive wa

Re: [PERFORM] Optimising "in" queries

2007-08-23 Thread Russell Smith
Russell Smith wrote: Filter: (sensor_id = ANY ('{1137,1138,1139,1140}'::integer[])) I've never seen this plan item except for when array's are involved. I could be wrong. I'd like to know how this is generated when you don't have an array. I have just discovered that PG 8.2 will turn an

Re: [PERFORM] Optimising "in" queries

2007-08-23 Thread Russell Smith
Michael Glaesemann wrote: On Aug 22, 2007, at 5:58 , Russell Smith wrote: Stephen Davies wrote: select count(rdate),rdate from reading where sensor_id in (1137,1138,1139,1140) group by rdate order by rdate desc limit 1; It would have been helpful to see the table definition here. I can s