Update Statistic question
Posted in 2000
Topics: General Discussion
Hi all, Before exporting an Informix database, I usually do 'update statistic' this database. I'm curious if I need to run 'update statistic' again after import this database. What happen if I forget to do it? Thanks in advance for any advise. H.V
Huy Vu wrote:
> I'm curious if I need to run 'update statistic' again after import this
> database. What happen if I forget to do it?
Newer versions of dbexport seem to include the update statistics
command in the sql scripts used by dbimport. If it wasn't done
your engine would make serious mistakes whem trying to optimise
data access paths doing your queries. Then you should do it yourself
after importing.
Fernando
--
Fernando Fernandez
http://despodata.pt/ddata/pessoal/ferdez.htm
In article <Fmbd4.3474$2x3.71515@newscontent-01.sprint.ca>, "Huy Vu" <huyv@usa.net> wrote: > Hi all, > > Before exporting an Informix database, I usually do 'update statistic' this > database. > > I'm curious if I need to run 'update statistic' again after import this > database. What happen if I forget to do it? > > Thanks in advance for any advise. > > H.V > > I wouldn't think that updating statistics before exporting would do you any good. I could be wrong, it happened once before... :) If you don't update statistics again after importing the database the hash tables won't necessarily be correct, and the optimizer will have problems. This will cause a performance drop. -- # unrm / ksh: unrm: not found # man cpio Sent via Deja.com http://www.deja.com/ Before you buy.
>I wouldn't think that updating statistics before exporting would do you
>any good. I could be wrong, it happened once before... :)
This is correct, of course. I suppose he may have been using "export" to
mean onunload instead of dbexport; in that case the updated statistics from
before the unload will be retained in the copy.
>If you don't update statistics again after importing the database the
>hash tables won't necessarily be correct, and the optimizer will have
>problems. This will cause a performance drop.
Absolutely. In my (bitter) experience this is a lesson that everyone learns
once, the hard way! Like not using cylinder 0 for a raw disk slice on
Solaris.
Thanks again for your answers.
I always do an export with 'dbexport'.
If I don't do 'update statistic' before running 'dbexport' sometime
'dbimport' stops in complaining the nrows of 'tableA' is not match with
'tableA'.unl file for example. (or data corrupted).
How about the 'update statistic' if I have to migrate a Informix SE
database to IDS?
Thanks again.
H.V
"Neil Truby" <ntruby@netcomuk.co.uk> wrote in message
news:857cq9$dc4$1@taliesin2.netcom.net.uk...
> >I wouldn't think that updating statistics before exporting would do you
> >any good. I could be wrong, it happened once before... :)
> This is correct, of course. I suppose he may have been using "export" to
> mean onunload instead of dbexport; in that case the updated statistics
from
> before the unload will be retained in the copy.
>
> >If you don't update statistics again after importing the database the
> >hash tables won't necessarily be correct, and the optimizer will have
> >problems. This will cause a performance drop.
> Absolutely. In my (bitter) experience this is a lesson that everyone
learns
> once, the hard way! Like not using cylinder 0 for a raw disk slice on
> Solaris.
>
>