Re: [GENERAL] Speeding up query

2008-11-05 Thread Alvaro Herrera
Sam Mason wrote: > On Wed, Nov 05, 2008 at 09:52:29PM +0200, Andrus wrote: > > after that I got > > > > 1 1214 pg_shdepend 440 MB > > 2 1232 pg_shdepend_depender_index 285 MB > > 3 1233 pg_shdepend_referenc

Re: [GENERAL] Speeding up query

2008-11-05 Thread Sam Mason
On Wed, Nov 05, 2008 at 09:52:29PM +0200, Andrus wrote: > >You really could do with updating that; 8.1.4 is very old. 8.1.15 is > >the latest in the 8.1 series and has lots of bug fixes. > > Will update increase speed ? > Server is running for approx 4 years now and I havent encountered any bugs.

Re: [GENERAL] Speeding up query

2008-11-05 Thread Andrus
You really could do with updating that; 8.1.4 is very old. 8.1.15 is the latest in the 8.1 series and has lots of bug fixes. Will update increase speed ? Server is running for approx 4 years now and I havent encountered any bugs. Db size is 862 MB Bigger tables: 1 1214 pg_shdepe

Re: [GENERAL] Speeding up query

2008-11-05 Thread Sam Mason
On Wed, Nov 05, 2008 at 07:51:24PM +0200, Andrus wrote: > I have Server running on Windows XP using > PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 > (mingw-special) You really could do with updating that; 8.1.4 is very old. 8.1.15 is the latest in the 8.1 series and ha

Re: [GENERAL] Speeding up query

2008-11-05 Thread Alan Hodgson
On Wednesday 05 November 2008, "Andrus" <[EMAIL PROTECTED]> wrote: > takes 34 seconds. Tables are indexed and logfile shows autovacuum > running. I ran VACUUM ANALYZE. > It returns > > INFO: free space map contains 22501 pages in 77 relations > DETAIL: A total of 2 page slots are in use (incl

[GENERAL] Speeding up query

2008-11-05 Thread Andrus
I have Server running on Windows XP using PostgreSQL 8.1.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special) Db size is 862 MB 8 users Bigger tables: 1 1214 pg_shdepend 775 MB 2 1232 pg_shdepend_depender_index 285 M

Re: [GENERAL] Speeding up Query

2001-05-14 Thread Tom Lane
Alexander Lohse <[EMAIL PROTECTED]> writes: > Would it also possible to make multiple INTERSECTS? > How do these operate on each other, do I also use parentheses? Yes, if you don't want to think hard about what the precedence is (I don't recall either) ... regards, tom la

Re: [GENERAL] Speeding up Query

2001-05-14 Thread Alexander Lohse
>This is pretty horrid: you are generating a cross product of >events * event_ref * teams * orgs * pers and then selecting rows >multiple times out of that very large set. No wonder you lost >patience even with a small test database. I think you wanted >something like > >... >INTERSECT ( > >sele

Re: [GENERAL] Speeding up Query

2001-05-14 Thread Tom Lane
Alexander Lohse <[EMAIL PROTECTED]> writes: > ... > INTERSECT > select events.id from events,event_ref,teams,orgs,pers where 1=1 and > (lower(events.head) like '%web%' > or lower(events.search) like '%web%' > or lower(events.ort) like '%web%' > or lower(events.text) like '%web%' > or (ev