performancefoxpro

Tuning FoxPro data


We tune a SQL server database by index defragmentation, or re-indexing, or dropping and rebuilding an index. Are there any such data tuning techniques for Foxpro ?

Thanks, Chak.


Solution

  • for defragmenting tables...

    USE YourTable EXCLUSIVE
    PACK
    

    if your table has any memo fields do

    PACK MEMO
    

    if the table has indexes, the pack will automatically reindex them.

    As Arnis mentioned, most stuff in VFP are based on tables... forms, classes, reports although they have different extensions. So you could do

    use YourForm.scx exclusive
    pack memo 
    
    use YourClassLib.vcx exclusive
    pack memo
    
    use YourReport.frx exclusive
    pack memo
    
    use YourProject.pjx exclusive
    pack memo
    

    Additionally, if for your regular .dbf tables you want to kill individual indexes...

    use YourTable exclusive
    delete tag MyIndexTag
    

    or, to delete ALL indexes

    delete tag all