[GENERAL] WHERE IN (subselect) versus WHERE IN (1,2,3,)

2012-03-15 Thread Kevin Goess
My apologies, I'm sure this question has been asked before but I couldn't find anything on the list that meant anything to me. We have a table "contexts" with 1.6 million rows, and a table "articles" with 1.4 million rows, where an "article" is a particular kind of "context". We want to select fr

Re: [GENERAL] WHERE IN (subselect) versus WHERE IN (1,2,3,)

2012-03-19 Thread Kevin Goess
On Mon, Mar 19, 2012 at 9:24 AM, Albe Laurenz wrote: > That means that your statistics are not accurate. > > As a first measure, you should ANALYZE the tables involved and see if > the problem persists. If yes, post the new plans. > Aha, thanks, that explains why my test table with one row was s

Re: [GENERAL] WHERE IN (subselect) versus WHERE IN (1,2,3,)

2012-03-20 Thread Kevin Goess
Thanks for looking into it, Tom. We're using 9.0.4, so that might indeed be the problem. What additional data (if any) would you like to see? If you want to look into it further, I can give you schema, though I hesitate to spam the whole list. I could also mock up some tables and see what's the