Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any studies on when PACKing really helps?
Message
From
27/12/2006 10:36:18
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
27/12/2006 03:25:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01180412
Message ID:
01180492
Views:
20
>>for tables without any memo fields:
>>Was wondering if anyone knew at what precentage point deleted records casue a significant performance hit when doing SQL statements.
>>Is it a basic standard or does it depend on the number of fields and/or type of fields.
>
>AFAIK it depends on a lot of factors. If you use VFP9, you can use the new binary index type which is much smaller in size, and which makes the discussion more or less a non issue. But as a general rule, you should only pack a table in a maintainance module which is run regularly, like once per month or once per year.
>
>Personally I never delete records, so I never need to pack a table. In all my tables I have an extra field, reusable, which is set to true instead of deleting the record. When I need to add a record I do the following
>Select top 1 PK from mytable where resuable into array laDummy
>if _tally>0 && a reusable record is available
>  update mytable set myfield1=myvalue1, myfield2=myvalue2,...., reusable=.F. where PK=laDummy
>else
>  insert into mytable (myfield1,myfield2,...., PK,reusable) values (mavalue1,myvalue2,....,PKvalue,.T.)
>endif
I've done something similar. Now I use a datetime instead of a logical for the "deleted" tag. That way oldest records can be recycled first. The user may want to recall recently deleted records.
Previous
Reply
Map
View

Click here to load this message in the networking platform