Re: archive compression question
Posted in 1995
On Oct 28, 5:27pm, Steve Goldberg wrote: } Subject: Update Statistics - a newer question } Ok. Here's another update statistics question to start the debate again. } } I have a program that references 3 tables that have no indexes. Within } the program I create an index on each table and do update statistics. When } the body of the program starts, it runs dog slow. I kill the program and } restart it and it sails along smoothly. } } When does 4gl look at the "statistics" and know that there is an index } and the "up stats" has been done? I prepare the update statements. } Do I need to create the indexes and then do the prepare? (I just } thought of this just now and haven't tried it yet). Or create the } indexes before the program starts? } } Steve Goldberg } Landata RE-Source } steveg@landata.com }-- End of excerpt from Steve Goldberg You need to do the prepare after you have updated the statistics. The prepare is the place at which the optimisation is calculated so if you haven't done the update stats at this time then your prepared SQL statements will all do sequential scans. Cheers - Jim -- ----------------------------------------------------------------------------- Jim Gordon DHL Airways Inc. jgordon@us.dhl.com ----------------------------------------------------------------------------- My opinions are my own. They may vary with time but they remain mine!