Re: [PERFORM] Indices arent being used

2003-09-27 Thread Tom Lane
[EMAIL PROTECTED] writes: > Here is the explain analyze of the query: > explain analyze select count(*) from actvars, prodlevel where > actvars.product_level=prodlevel.code_level and > prodlevel.division_level='OY3S5LAPALL6'; > [ slow merge join ] I wonder whether a hash join wouldn't work better

Re: [PERFORM] Indices arent being used

2003-09-27 Thread rantunes
Here is the explain analyze of the query: explain analyze select count(*) from actvars, prodlevel where actvars.product_level=prodlevel.code_level and prodlevel.division_level='OY3S5LAPALL6'; Aggregate (cost=3123459.62..3123459.62 rows=1 width=32) (actual time=1547173.60..1547173.60 rows=1 loop

Re: [PERFORM] Indices arent being used

2003-09-26 Thread Tom Lane
[EMAIL PROTECTED] writes: > sort_mem = 2048 2 meg sort_mem seems on the small side. > Yes I have an index on actvars.product_level and an index on > prodlevel.code_level.Both indices have character(12) data types. Can you force an indexscan to be chosen by setting enable_seqscan off? If so, what

Re: [PERFORM] Indices arent being used

2003-09-26 Thread rantunes
>Damn.. Seq. scan for actvars? I would say half an hour is a good throughput. > >Are there any indexes on both actvars.product_level and prodlevel.code_level? Are >they exactly compatible type? int2 and int4 are not compatible in postgresql >lingo. > >That plan should go for index scan. Can you sho

Re: [PERFORM] Indices arent being used

2003-09-26 Thread Shridhar Daithankar
[EMAIL PROTECTED] wrote: Hi guys Im running a Datawarehouse benchmark (APB-1) on PostgreSql. The objective is to choose which of the to main db (PostgreSQL, MySQL) is fastest. I've run into a small problem which I hope could be resolved here. I'm trying to speed up this query: select count(*) fr

Re: [PERFORM] Indices arent being used

2003-09-25 Thread Rod Taylor
> Im running a Datawarehouse benchmark (APB-1) on PostgreSql. The objective is to > choose which of the to main db (PostgreSQL, MySQL) is fastest. I've run into a > small problem which I hope could be resolved here. > > I'm trying to speed up this query: > > select count(*) from actvars, prodleve