Buropro-Citation
asked on
Adding SQL record under delphi
Hi, I have some data to import into my SQL database, I'm currently doing speed tests and I can see that it takes 5 minutes to add 30000 records using either adodataset (append) or adocommand (insert into) which is pretty lame considering that a DBF file does this kind of operation in 4 seconds.
I noticed that when importing from a CSV file from sql manager it takes 1 second for the same amount of records. Is there any way for me to achieve this kind of performance using queries with the ADO components in Delphi?
I noticed that when importing from a CSV file from sql manager it takes 1 second for the same amount of records. Is there any way for me to achieve this kind of performance using queries with the ADO components in Delphi?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Another problem with the text file solution is that I have to make sure that the field separation caracter is not in any of my data. Also, I'm not sure if it would work well with blob field, not to mention that this would make a huge file and I think that text file have some problem when it's too big.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Though every solutions mentioned here were good, I have found the BEGIN TRANS and COMMIT TRANS function to solve all my problems. It is pretty much as fast as importing from a CSV. Not as fast as one million rows per seconds but fast enough for my needs, I'll buy SDAC if I wan't any further speed.
ASKER