Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop the table or rename the table

Status
Not open for further replies.

manmaria

Technical User
Aug 8, 2003
286
US
Do I need to rebuild the definition to collect the STATS if I drop the table?

What are all the disadvantages of renaming a table?

Thanks

 
Hi,
DROP TABLE deletes all refrerences to a Table on the system , all indexes and Stats will be dropped as well.

Why are you issueing the DROP table? If you want to get rid of all the rows you could issue a

Delete Table ...

insteadand it will ONLY delete the data rows, everything else will be left in tact.

 
Not the stats, stats will go stale anytime you change a table. Stale stats are still useful if you only make small changes to the table however.

However, the columns on which you specify you want to collect stats will still exist, so I'm pretty sure after you:

DELETE <table>;
< insert into your table >
Collect Statistics ON <table>

You don't have to respecify which columns you want stats on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top