Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-23 Thread Tom Lane
Martin Marques <[EMAIL PROTECTED]> writes: > Ok, now the 8.1 server has a RAID1 hardware board with SCSI disks, and > the 8.2 is just a PentiumD with SATA disks (it's my desktop PC where I > do tests). Should I have a lower random_page_cost on a machine that is > likely to have a lower disk IO s

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-23 Thread Martin Marques
Alvaro Herrera wrote: It's an arbitrary number, based on which all the other numbers are measured. Now that I read more intensively he docs I see that all the cost parameters are related one with the other. What people generally do around here is mess with random_page_cost, and leave seq_p

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-23 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Martin Marques escribió: >>> seq_page_cost = 5.0 # measured on an arbitrary scale > What people generally do around here is mess with random_page_cost, and > leave seq_page_cost alone. It's also worth pointing out that having seq_pa

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-23 Thread Alvaro Herrera
Martin Marques escribió: > Martin Marques escribió: >> Pavel Stehule wrote: >>> >>> try >>> >>> set work_mem to '8MB'; >>> and >>> explain analyze select .. >> These things didn't help. What changed the plan completely was this: >> seq_page_cost = 5.0 # measured on an arbitrary

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-23 Thread Pavel Stehule
2007/10/23, Martin Marques <[EMAIL PROTECTED]>: > Martin Marques escribió: > > Pavel Stehule wrote: > >> > >> try > >> > >> set work_mem to '8MB'; > >> and > >> explain analyze select .. > > > > These things didn't help. What changed the plan completely was this: > > > > seq_page_cost = 5.0

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-23 Thread Martin Marques
Martin Marques escribió: Pavel Stehule wrote: try set work_mem to '8MB'; and explain analyze select .. These things didn't help. What changed the plan completely was this: seq_page_cost = 5.0 # measured on an arbitrary scale cpu_tuple_cost = 0.05 # same

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Martin Marques
Pavel Stehule wrote: 2007/10/22, Martin Marques <[EMAIL PROTECTED]>: Pavel Stehule wrote: 2007/10/22, Martin Marques <[EMAIL PROTECTED]>: Pavel Stehule wrote: Hello I am unsure, did you check config values? Don't know which ones you are talking about, but all enable_* are set to on. Anythi

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Martin Marques
Tomas Vondra wrote: 2007/10/22, Martin Marques <[EMAIL PROTECTED]>: Pavel Stehule wrote: Hello I am unsure, did you check config values? Don't know which ones you are talking about, but all enable_* are set to on. Anything else? shared_buffers work_mem effective_cache_size Pavel Wel

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Pavel Stehule
2007/10/22, Martin Marques <[EMAIL PROTECTED]>: > Pavel Stehule wrote: > > 2007/10/22, Martin Marques <[EMAIL PROTECTED]>: > >> Pavel Stehule wrote: > >>> Hello > >>> > >>> I am unsure, did you check config values? > >> Don't know which ones you are talking about, but all enable_* are set to > >>

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Martin Marques
Pavel Stehule wrote: 2007/10/22, Martin Marques <[EMAIL PROTECTED]>: Pavel Stehule wrote: Hello I am unsure, did you check config values? Don't know which ones you are talking about, but all enable_* are set to on. Anything else? shared_buffers 8.1: 16000 8.2: 400MB work_mem

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Tomas Vondra
2007/10/22, Martin Marques <[EMAIL PROTECTED]>: Pavel Stehule wrote: Hello I am unsure, did you check config values? Don't know which ones you are talking about, but all enable_* are set to on. Anything else? shared_buffers work_mem effective_cache_size Pavel Well, the cost_* values m

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Pavel Stehule
2007/10/22, Martin Marques <[EMAIL PROTECTED]>: > Pavel Stehule wrote: > > Hello > > > > I am unsure, did you check config values? > > Don't know which ones you are talking about, but all enable_* are set to on. > > Anything else? > shared_buffers work_mem effective_cache_size Pavel > -- > 21

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Martin Marques
Pavel Stehule wrote: Hello I am unsure, did you check config values? Don't know which ones you are talking about, but all enable_* are set to on. Anything else? -- 21:50:04 up 2 days, 9:07, 0 users, load average: 0.92, 0.37, 0.18 -

Re: [GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Pavel Stehule
Hello I am unsure, did you check config values? Pavel 2007/10/22, Martin Marques <[EMAIL PROTECTED]>: > I have to PG servers, one ver. 8.1.9 and the other 8.2.4. > > I was checking a query out and found that with the exact same DB (same > data in it) and the same query I get different plans, and

[GENERAL] Bitmap Heap scan 8.1/8.2

2007-10-22 Thread Martin Marques
I have to PG servers, one ver. 8.1.9 and the other 8.2.4. I was checking a query out and found that with the exact same DB (same data in it) and the same query I get different plans, and significantly higher time in 8.2: On 8.1 I get: test=> explain analyze SELECT * FROM prestamos WHERE bibl