Re: [PERFORM] Query optimization help

2011-08-30 Thread Ondrej Ivanič
Hi, 2011/8/30 Szymon Kosok : > 2011/8/30 Ondrej Ivanič : >> Could you please re-post your explain using this web site: >> http://explain.depesz.com/ and post links to Stackoverflow question? > > Here it is: http://explain.depesz.com/s/Iaa > >> - try to disable nested loop join (set enable_nestloop

Re: [PERFORM] Query optimization help

2011-08-30 Thread Szymon Kosok
2011/8/30 Ondrej Ivanič : > Could you please re-post your explain using this web site: > http://explain.depesz.com/ and post links to Stackoverflow question? Here it is: http://explain.depesz.com/s/Iaa > - try to disable nested loop join (set enable_nestloop=off) Even worse performance (http://e

Re: [PERFORM] Query optimization help

2011-08-29 Thread Ondrej Ivanič
Hi, On 30 August 2011 15:36, Szymon Kosok wrote: > Hello, > > I asked that question on StackOverflow, but didn't get any valuable > response, so I'll ask it here. :) > > I have such query: Could you please re-post your explain using this web site: http://explain.depesz.com/ and post links to Sta

Re: [PERFORM] query optimization help

2005-01-14 Thread sarlav kumar
Hi,   Thanks for the help. I actually got around with it by doing the following. I created a temporary table:   create table statesnew as select distinct state,state_code from postalcode where lower(country)='us';   And then changed the query to :   SELECT (SELECT sn.state FROM statesnew sn WHERE U

Re: [PERFORM] query optimization help

2005-01-14 Thread Merlin Moncure
Please post in plaintext, not html where possible. Your group by clause was 'myst'...was that supposed to be mystate? Her is something you might try...use the original query form and create a function which resolves the state code from the input data...you are already doing that with upper. So,