Re: [PERFORM] Two different execution plans for similar requests

2011-04-20 Thread Joby Joba
random_page_cost with a value set to "2" and it works fine Thanks for your help 2011/3/1 Maciek Sakrejda > On Tue, Mar 1, 2011 at 4:44 AM, Joby Joba wrote: > > Me again ! I have checked this question of 'explain analyze' and I > > understand now. > > > > When the problem occured I have run a

Re: [PERFORM] Two different execution plans for similar requests

2011-03-01 Thread Maciek Sakrejda
On Tue, Mar 1, 2011 at 4:44 AM, Joby Joba wrote: > Me again ! I have checked this question of 'explain analyze' and I > understand now. > > When the problem occured I have run a 'EXPLAIN' > > I have run the request again to open this case using 'EXPLAIN ANALYZE' but I > didn't reproduce the case.

Re: [PERFORM] Two different execution plans for similar requests

2011-03-01 Thread Joby Joba
Me again ! I have checked this question of 'explain analyze' and I understand now. When the problem occured I have run a 'EXPLAIN' I have run the request again to open this case using 'EXPLAIN ANALYZE' but I didn't reproduce the case. That's why I sent the other trace but it doesn't countain the

Re: [PERFORM] Two different execution plans for similar requests

2011-03-01 Thread Joby Joba
Sorry ! The command I use is 'EXPLAIN ANALYZE' I can't do better ... 2011/3/1 > > I've already used an 'EXPLAIN ANALYZE' to post the message. So I don't > > clearly understand what you are expecting for, when you tell me to > provide > > 'EXPLAIN ANALYZE' (please excuse me for the misunderstood

Re: [PERFORM] Two different execution plans for similar requests

2011-03-01 Thread tv
> I've already used an 'EXPLAIN ANALYZE' to post the message. So I don't > clearly understand what you are expecting for, when you tell me to provide > 'EXPLAIN ANALYZE' (please excuse me for the misunderstood) No, you haven't. You've provided 'EXPLAIN' output, but that just prepares an execution

Re: [PERFORM] Two different execution plans for similar requests

2011-03-01 Thread Joby Joba
I've already used an 'EXPLAIN ANALYZE' to post the message. So I don't clearly understand what you are expecting for, when you tell me to provide 'EXPLAIN ANALYZE' (please excuse me for the misunderstood) I agree with you when you say that for two different values, the costs will be different. Bu

Re: [PERFORM] Two different execution plans for similar requests

2011-03-01 Thread tv
Hi, and why do you think this is a problem? The explain plan is expected to change for different parameter values, that's OK. The merge in the first query is expected to produce significantly more rows (91774) than the other one (229). That's why the second query chooses nested loop instead of mer

[PERFORM] Two different execution plans for similar requests

2011-03-01 Thread Joby Joba
*Hi all ! Postgresql (8.2) has as a strange behaviour in some of my environments. * *A request follows two execution plans ( but not always !!! ). I encounter some difficulties to reproduce the case.* *J-2* Aggregate (*cost=2323350.24..2323350.28 rows=1 width=24*) -> Merge Join (cost=2214044