Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed up appending/indexing?
Message
From
04/04/2002 13:35:50
 
 
To
04/04/2002 09:37:07
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00640552
Message ID:
00641006
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
Try something like this:
SELECT imp_table
DELETE TAG ALL
APPEND FROM imp_source FOR showit()
WAIT CLEAR
INDEX ON col_name TAG col_name

FUNCTION showit()
  WAIT WINDOW NOWAIT STR(RECNO()/RECCOUNT()* 100)+"% complete"
ENDFUNC
>Thanks for the suggestion Tom,
>I'll give it a try. Although...
>
>Is there a way that you know of to list the indexes to a printer/file? I can't stand the typos my computer makes <g> and doctors are envious of my handwriting.
>
>I have my suspicions about about deleting and indexing since the original indexing took over two hours, but I will try.
>
>Just to make sure I'm not reading wrong (dyslexics, Untie!), my steps wil be:
>1. Delete the CDX
>2. Append the records from my incoming table
>3. Recreate the CDX
>
>I'm not sure of the purpose of the UDF. My APPEND consists of:
>
WAIT WINDOW NOWAIT " Now appending to MASTER. "   + chr(13) + ;
>                   "    Takes about 20 minutes. " + chr(13) + ;
>                   "        Started at " + time()
>APPEND FROM trans
>What would the UDF do? (Pardon my ignorance)
>
>Tanx
>Pete
>
>
>>Consider deleting all the index tags prior to the APPEND and then recreating the index. You might be surprised in that this may indeed be faster than keeping the original index tags.
>>
>>You can create a UDF() and call it on the FOR clause of an append from. While this will give the user a message, it will by definition slow things down...
>>
>>>Hi everyone,
>>>
>>>I have a FPW2.A table with 5.7 meg records and I have to append about 40K records in one shot, once a week. I have seven indexes for the table which I only use to retrieve SELECTed data. The table seems optimized fairly well at this point since it typically takes less than one second to get the data.
>>>
>>>The problem is it's taking around fifteen minutes to append the new records. It's the indexing that's taking the time.
>>>
>>>The questions are:
>>>1. Can this be sped up?
>>>2. Is there a way to indicate that something is happening, like "Appending Records"; "Indexing Index##" and the like? Maybe a progress bar? Something instead of the non-informative hourglass.
>>>
>>>Any advice and smart-alec comments appreciated.
>>>TIA,
>>>Pete
Previous
Reply
Map
View

Click here to load this message in the networking platform