"ab" densities are in the column group stats. That combined with both histograms ought to be statistically sufficient. Don't you think?
"Eugene Korolkov" <***@davidsohn.com> wrote in message news:***@davidsohn.com...
As for now I am just running it every night for every table
(only update statistics being replaced by update index statistics,
actually I would not say that it is real index statistics because knowing
that 'a' is 2 times in col1 and 'b' is 5 times in col2 not allowing you to know
how many times 'ab' happened)
HTH,
Eugene
Shahryar G. Hashemi wrote:
Damn Sybase and all its new VERSION features :). But of course I wait for ASE 15.1 :)
Shahryar
Stefan Karlsson wrote:
"Eugene Korolkov" <***@davidsohn.com> wrote in message news:***@davidsohn.com...
Stefan,
It looks cool, but unfortunately only for 15.x ? Right ? :-(
Yes, the datachange() function is yet another new handy feature in 15.0 and yet another reason to consider that version :)
/Stefan
Regards,
Eugene
Stefan Karlsson wrote:
"Eugene Korolkov" <***@davidsohn.com> wrote in message news:***@davidsohn.com...
Is there any procedural way to check that you table data has been
changed by 9% or 11% ? :-)
See the datachange() function at
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.blocks/html/blocks/blocks134.htm
HTH,
/Stefan
That myth (10% changed data) already was discussed (see for example
Eric Miner's optimizer articles).
Tommy Phillips wrote:
AJ wrote:
Hello,
How important it is to run 'update statistics' and how often
should I do this. What's the best method of doing this and
where can I find some good doc on this, also, can it be done
when db is online?
TIA
The rule of thumb back when I was teaching classes for Sybase was that
you should try to update statistics whenever about 10% of the table
had changed.
In fact, sometimes you need to be even more aggressive than this. For
instance, in many tables, most of the activity is on the most recent
entries. Statistics that are even a few days old may fool the
optimizer and cause unnecessary table scans.
One way to improve your odds in this kind of situation is to execute
sp_recompile on tables after you have updated statistics. This gives
you a fighting chance of having good query plans at least for your
stored procedures.
As for doing it when the database is online, you cannot do it when the
database is offline. However, be aware that it does cause a lot of
activity and contention, so you are better off to do it during
low-activity times, or during a maintenance window, if you have that
option.