--- Tom Lane <tgl@sss.pgh.pa.us> skrev:
> =?iso-8859-1?q?Rolf=20=D8stvik?=
> <rolfostvik@yahoo.no> writes:
> > First i have some queries to give you a feel of
> size
> > of datasets and plans and times.
>
> You said earlier that essentially all the rows of
> step_result_subset
> have step_parent = 0 ... is that really true?
Not true, but i am sorry if it could be intepreted
that way.
What i tried to say was
step_result_subset contain 17 179 506 rows
uut_Result_subset contain 176 555 rows
There is one entry in step_result_subset with the
condition step_parent = 0 for each entry in
uut_result_subset (there is 176 555 rows in
step_result_subset which have step_parent = 0).
For this (sample) query i have found that if i select
just a little bigger data set (setting start_date_time
to an earlier date) the plan selected by the server
does the best job and gives a more stable execution
time independent of size of data sets. I also have
found that my theories of the best solution has been
wrong.
If you (Tom) still want me to do the following steps
then please tell me.
> I can
> hardly believe
> that either 7.4 or 8.2 would use an indexscan for
> Q-A if so.
>
> I'd be interested to see the results of
>
> prepare foo(int) as select id from
> step_result_subset sr
> where uut_result = $1 and step_parent = 0;
> explain analyze execute foo(42);
>
> (use some representative uut_result value instead of
> 42). If it doesn't
> want to use an indexscan for this, disable plan
> types until it does.
> This would perhaps shed some light on why 8.2
> doesn't want to use a scan
> like that as the inside of a nestloop.
>
> regards, tom lane
>
Best regards
Rolf Østvik
__________________________________________________
Bruker du Yahoo!?
Lei av spam? Yahoo! Mail har den beste spambeskyttelsen
http://no.mail.yahoo.com