Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: 10g optimizer and dynamic sampling
On Fri, 2 Jun 2006 21:17:11 +0200, p.santos000_at_gmail.com wrote
(in article <1149275831.679162.135990_at_u72g2000cwu.googlegroups.com>):
> > Ronald Rood wrote: >> On Fri, 2 Jun 2006 16:42:46 +0200, p.santos000_at_gmail.com wrote >> (in article <1149259366.409877.203280_at_i39g2000cwa.googlegroups.com>): >>
>> <snip>
>> <snip>
>> >> Why not take care for correct statistics and forget about the dynamic >> sampling ? to my opinion dynamic sampling just adds extra overhead to the >> query, increasing the response times. >> >> >> -- >> With kind regards / met vriendelijke groeten, >> Ronald >> >> http://ronr.blogspot.com/ >> http://ronr.nl/unix-dba > > Well that's a good point, but here is the difficult thing about this > system. Our customers > upload data anytime they want at any point of the day. So in the > morning COL1='X' could > return 100 rows, but the same query in the evenning could yield a > million rows. > > Most of the queries executed on our system take anywhere from 5 minutes > to 30-45 minutes, so a couple of extra seconds is for the sampling is > insignificant.
Do you need a different plan for these different situations ? If all
distributions vary by that amount, it could still be possible to use the same
plan. If you do need new plans, why not gather stats as part of the load
process.
I agree that with those runtimes the few seconds for sampling does not add a
significant time for the runtime. If scalability is no problem, it's ok. I
would go for sampling as part of the load.
-- With kind regards / met vriendelijke groeten, Ronald http://ronr.blogspot.com/ http://ronr.nl/unix-dbaReceived on Sun Jun 04 2006 - 05:09:00 CDT
![]() |
![]() |