Re: [PERFORM] sequence scan on PK

2005-05-08 Thread Grega Bremec
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom Lane wrote: | Jeroen van Iddekinge <[EMAIL PROTECTED]> writes: | |>>You could tweak with several settings to get it to do an index scan |>>earlier, but these would probably break other queries. You don't need to |>>tune for 100 rows, morelike 100k o

Re: [PERFORM] sequence scan on PK

2005-05-08 Thread Jeroen van Iddekinge
Matteo Beccati wrote: Hi, Yes , it was a bit to high (18) so a lowered it. It speeded up some pages for about 5%. 18? The default is 4 if I can remember correctly. I wonder if your db has ever seen an index scan ;) I was expermenting how much some setting influence has on the perfomance of som

Re: [PERFORM] sequence scan on PK

2005-05-08 Thread Matteo Beccati
Hi, Yes , it was a bit to high (18) so a lowered it. It speeded up some pages for about 5%. 18? The default is 4 if I can remember correctly. I wonder if your db has ever seen an index scan ;) Best regards -- Matteo Beccati http://phpadsnew.com/ http://phppgads.com/ ---(e

Re: [PERFORM] sequence scan on PK

2005-05-08 Thread Tom Lane
Jeroen van Iddekinge <[EMAIL PROTECTED]> writes: >> You could tweak with several settings to get it to do an index scan >> earlier, but these would probably break other queries. You don't need to >> tune for 100 rows, morelike 100k or 100M. > Which settings shoud I change for this? I'd agree with

Re: [PERFORM] sequence scan on PK

2005-05-08 Thread Jeroen van Iddekinge
You should lower random_page_cost to make the planner choose an index scan vs sequential scan. Yes , it was a bit to high (18) so a lowered it. It speeded up some pages for about 5%. Reg. Jer ---(end of broadcast)--- TIP 1: subscribe and unsubscr

Re: [PERFORM] sequence scan on PK

2005-05-08 Thread John A Meinel
Jeroen van Iddekinge wrote: You could tweak with several settings to get it to do an index scan earlier, but these would probably break other queries. You don't need to tune for 100 rows, morelike 100k or 100M. Thanks for respone. The index scan was a little bit faster for id=1 and faster for id=

Re: [PERFORM] sequence scan on PK

2005-05-08 Thread Matteo Beccati
Hi, Thanks for respone. The index scan was a little bit faster for id=1 and faster for id=99. Which settings shoud I change for this? cpu_index_tuple_cost , cpu_operator_cost, cpu_tuple_cost? You should lower random_page_cost to make the planner choose an index scan vs sequential scan. Best re

Re: [PERFORM] sequence scan on PK

2005-05-08 Thread Jeroen van Iddekinge
You could tweak with several settings to get it to do an index scan earlier, but these would probably break other queries. You don't need to tune for 100 rows, morelike 100k or 100M. Thanks for respone. The index scan was a little bit faster for id=1 and faster for id=99. Which settings shoud I ch

Re: [PERFORM] sequence scan on PK

2005-05-08 Thread John A Meinel
Jeroen van Iddekinge wrote: Hi, I understand that when a table contains only a few rows it is better to do a sequence scan than an index scan. But is this also for a table with 99 records? ... explain select * from tblFolders where id=90; QUERY PLAN --