Re: [SQL] sql performance and cache

2003-10-11 Thread Chris Faulkner
Hello Thanks for the reply. > The short answer is that PG doesn't cache query results. The only > way it could > do so safely is to lock all tables you access to make sure that no other > process changes them. That would effectively turn PG into a > single-user DB in > short notice. I am not sur

[SQL] sql performance and cache

2003-10-11 Thread Chris Faulkner
Hello all I have two very similar queries which I need to execute. They both have exactly the same from / where conditions. When I execute the first, it takes about 16 seconds. The second is executed almost immediately after, it takes 13 seconds. In short, I'd like to know why the query result isn

[SQL] monitor sessions

2003-10-10 Thread Chris Faulkner
Hello Can anyone tell me - is there a system table or view that I can query to show all current sessions ? Thanks Chris ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

[SQL] create new field

2003-10-06 Thread Chris Faulkner
Hello I would like to change the type of a column. At the moment, it is varchar(4) but I would like it to be int. All values in the field at the moment are actually integer. I tried a way I had seen in the archives - it foes along the lines of adding a column, using update, drop the old column an

Re: [SQL] length of array

2003-08-28 Thread Chris Faulkner
1] = 0 and N.level[2] = 0 and N.level[3] = 0 and N.level[4] = 0 but my row with 2 elements in the array won't be returned with this condition. Chris -Original Message- From: Joe Conway [mailto:[EMAIL PROTECTED] Sent: 28 August 2003 01:40 To: Chris Faulkner Cc: [EMAIL PROTECTED] Su

[SQL] length of array

2003-08-28 Thread Chris Faulkner
Hello Is there a function in postgres to return the length of an array field ? I have seen array_dims(array) but this returns a character value. Ideally, I'd like something numeric returned. Thanks Chris ---(end of broadcast)--- TIP 6: Have you