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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Tags

Status
Not open for further replies.

gregjohn

Technical User
Aug 13, 2001
29
US
I have several tables that are part of a database (which is part of a project) with approx 200 fields and 5,000 records. I also have about 200 index tags.

Unfortunately, I need to change the tag expression. Trying to rewrite the index seems to take a long time and I keep getting that pesky index exists overwrite popup (although I am sure there is a way to disable that -- I just don't know how).

I have tried to delete the table from the database, copy the table structure from a similar table and just redo the indexing procedure. Problem is it literally takes more than an hour for the table to delete from the database/project. Does anyone know why it takes so long?

Anyone have any ideas on how I could rewrite these index tags without having it take so long.

Thanks

I have tried to do this but everything seems to take a long time (like an hour per table) to make the change.
 
Gregjohn,

Have you tried using the command
Code:
ALTER TABLE <Tablename> DROP FOREIGN KEY TAG <TagName>
and then issuing an
Code:
INDEX ON <Fieldname> TAG <TagName>
This requires exclusive access to the table. Check the help for the ALTER TABLE command.

A couple of questions:
[ol][li]why do you have 200 index tags on the table? I suspect that is why it all takes so long. You can create temporary indexes on tables as and when you need to use them.[/li]
[li]How often are you making these changes to the tag expressions?[/li][/ol]


Hope that helps,

Stewart
PS If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Greg,

index exists overwrite popup Try SET SAFETY OFF

You have an index on every field? (more or less)

idxutil.zip is available at UT in the downloads that will create a data dictionary you can use to reindex.

Regards,

Mike
 
Gregjohn,

My first reaction is similar to Stewart's: 200 tags is a heck of a lot for one table. For that matter, so are 200 fields. That alone would go some way to explaining the slowness you are seeing.

I'm not sure why you need to remove the table from the database. I would have thought that either an ALTER TABLE command, or DELETE TAG followed by INDEX ON would do the trick.

Is this something you plan to do on a regular basis? If not, why not just go ahead and run it over a coffee break?

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top