>>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
> 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.