Re: [GENERAL] simple query runs 26 seconds

2007-08-29 Thread Andrus
> OK, so the info relevant to this query is > >> INFO: index "rid_toode_idx" now contains 1517900 row versions in 9950 >> pages >> DETAIL: 7375 index row versions were removed. >> 245 index pages have been deleted, 232 are currently reusable. > >> INFO: "rid": found 7375 removable, 1517900 nonr

Re: [GENERAL] simple query runs 26 seconds

2007-08-27 Thread Tom Lane
"Andrus" <[EMAIL PROTECTED]> writes: >> The time seems entirely spent in fetching rows from table "rid". >> Perhaps that table is bloated by lack of vacuuming --- can you >> show the output from "vacuum verbose rid"? OK, so the info relevant to this query is > INFO: index "rid_toode_idx" now con

Re: [GENERAL] simple query runs 26 seconds

2007-08-27 Thread Andrus
> Perhaps that table is bloated by lack of vacuuming --- can you > show the output from "vacuum verbose rid"? Thank you. After running vacuum and analyze commands the query takes 18 seconds. This is still very slow because my tables are indexed. How to speed up this ? set search_path to firma1,p

Re: [GENERAL] simple query runs 26 seconds

2007-08-27 Thread Andrus
> The time seems entirely spent in fetching rows from table "rid". > Perhaps that table is bloated by lack of vacuuming --- can you > show the output from "vacuum verbose rid"? INFO: vacuuming "firma1.rid" INFO: scanned index "rid_pkey" to remove 7375 row versions DETAIL: CPU 0.01s/0.39u sec el

Re: [GENERAL] simple query runs 26 seconds

2007-08-26 Thread Tom Lane
"Andrus" <[EMAIL PROTECTED]> writes: > My query takes 26 seconds to run. The time seems entirely spent in fetching rows from table "rid". Perhaps that table is bloated by lack of vacuuming --- can you show the output from "vacuum verbose rid"? regards, tom lane --

[GENERAL] simple query runs 26 seconds

2007-08-26 Thread Andrus
I have W2K server, relatively small database containing all required indexes and need to sum only few records. My query takes 26 seconds to run. How to fix this ? Andrus. explain analyze select sum(taitmata) as ukogus from rid join dok using (dokumnr) where toode='NE TR' and doktyyp=