Re: [PERFORM] two queries and dual cpu (perplexed)

2005-04-22 Thread Daniel Schuchardt
Shoaib Burq (VPAC) schrieb: Hi everybody, One of our clients was using SQL-Server and decided to switch to PostgreSQL 8.0.1. Hardware: Dual processor Intel(R) Xeon(TM) CPU 3.40GHz OS: Enterprise Linux with 2.6.9-5 SMP kernel Filesystem: ext3 SHMMAX: $ cat /proc/sys/kernel/shmmax 6442450944 <--- b

Re: [PERFORM] cpu_tuple_cost

2005-03-20 Thread Daniel Schuchardt
Tom Lane wrote: Reducing random_page_cost is usually the best way to get the planner to favor indexscans more. Ok, I tried a bit with random_page_cost and I have set it to 1 to become PG using the index on mitpln: CIMSOFT=# ANALYSE mitpln; ANALYZE CIMSOFT=# SET random_page_cost=2; SET CIMSOFT=#

[PERFORM] cpu_tuple_cost

2005-03-13 Thread Daniel Schuchardt
Hi List, i have a query plan who is bad with standard cpu_tuple_costs and good if I raise cpu_tuple_costs. Is it is a good practice to raise them if i want to force postgres to use indexes more often? Or is it is better to disable sequence scans? CIMSOFT=# ANALYSE mitpln; ANALYZE CIMSOFT=# EXPL

Re: [PERFORM] cpu_tuple_cost

2005-03-13 Thread Daniel Schuchardt
I have forgotten this : CREATE OR REPLACE FUNCTION date_to_yearmonth_dec(TIMESTAMP) RETURNS VARCHAR AS' BEGIN RETURN extract(year FROM $1) || extract(month FROM $1)-1; END'LANGUAGE plpgsql IMMUTABLE; ---(end of broadcast)--- TIP 9: the planner will