Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The fastest way to move data from one table to another?
Message
From
05/01/2009 04:17:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01370929
Message ID:
01370957
Views:
52
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I have two tables with identical structures (Current and History). I need to move all data from Current into History and also clean data a bit during this process. I'm doing this in a scan loop, but the process is very slow (I have more than 4mln. records - 1,6GB). Do you have other ideas of moving data?
>
>Thanks in advance.

Insert into ... select ...

would be a fast way but you say there is "clean data" process. Without knowing the details it is like shooting in dark. If it is something you can do with a where clause then you are done with an SQL. I would do the process locally if it is not something like SQL server (with SQL server it would be fast enouhg you wouldn't ask this question I think, but you are using scan...endscan which maybe the reason to be slow).

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform