Re: [PERFORM] Lack of index usage when doing array casts

2014-02-21 Thread Peter Geoghegan
On Fri, Feb 21, 2014 at 2:37 PM, Alexey Klyukin wrote: > Hopefully I'll be able to give it a spin next week and will let you know > whether the patch improved the execution plans in our environment. 9.3.3 is out this week; you'll have to wait a few months for this if you're using standard package

Re: [PERFORM] Lack of index usage when doing array casts

2014-02-21 Thread Alexey Klyukin
Thank you! Hopefully I'll be able to give it a spin next week and will let you know whether the patch improved the execution plans in our environment. Sincerely, -- Alexey Klyukin

Re: [PERFORM] Lack of index usage when doing array casts

2014-02-21 Thread Tom Lane
I wrote: > Hmm. IIRC the text to enum cast is considered stable not immutable, which > is why that doesn't get folded to a Const on sight. However, it seems > like it'd be okay for scalararraysel() to reduce stable expressions for > estimation purposes, ie it should be using estimate_expression_v

Re: [PERFORM] Lack of index usage when doing array casts

2014-02-21 Thread Tom Lane
Alexey Klyukin writes: > We had a problem with PostgreSQL not using an index scan in 2 similar > queries, the only difference between them is the array cast from text[] to > location_type[] (array of enum values). Hmm. IIRC the text to enum cast is considered stable not immutable, which is why t

[PERFORM] Lack of index usage when doing array casts

2014-02-21 Thread Alexey Klyukin
Hello, We had a problem with PostgreSQL not using an index scan in 2 similar queries, the only difference between them is the array cast from text[] to location_type[] (array of enum values). The execution plans are the following: 1. Hash Join (cost=1.68..64194.88 rows=962149 width=62) (actual

[PERFORM] Postgresql tunning-- help needed

2014-02-21 Thread Ashutosh Durugkar
Hello Postgresql experts, We are facing issues with our PostgreSQL databases running on Ubuntu server, right after we shifted our databases from OpenSuse O/S. It's a new database servers runs fine for most of the time (Avg. Load 0.5 to 1.0) but suddenly spikes once/twice a day.This happens four t