very slow to insert a record
Posted: Wed 13 Aug 2008 19:50
Hello, I have a table with more than 100,000 records. And I have to sometimes add a few new records. Just insert, no need to read and show.
But I found the speed is very very slow. I think even though I just want to insert the record, but TMyTable load at first all the data records, so it is very very slow. Is this the case? Or how I can solve this problem? Thanks in advance.
And more for my slow solution:
I tried to set fetchAll property to false, and just fetch one row from the table.
And using both table.InsertRecord method and table.Insert and then table.post.
From debuging I know the program waits at the Post point.
Also I tried with MyQuery, but I need unicode value support and I could not insert unicode value directly to the sql statement.
Please help. Thanks!!
But I found the speed is very very slow. I think even though I just want to insert the record, but TMyTable load at first all the data records, so it is very very slow. Is this the case? Or how I can solve this problem? Thanks in advance.
And more for my slow solution:
I tried to set fetchAll property to false, and just fetch one row from the table.
And using both table.InsertRecord method and table.Insert and then table.post.
From debuging I know the program waits at the Post point.
Also I tried with MyQuery, but I need unicode value support and I could not insert unicode value directly to the sql statement.
Please help. Thanks!!