I need to read millions of registers from an Oracle database using ADO. What parameters should be used in order to achieve the best performance?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is faster to use the ADO _Recordset interface directly instead of use TADODataset.
ADO is not very fast, and TADODataset needs to query the underlying _Recordset to determine the column types etc (ADO has safecall interfaces so quite some overhead for each function/property read, look at the generated assembly in the CPU view).
By using _Recordset directly I have optimized the loading of data into our own dataobjects with a factor 2 (lots of small queries). Maybe it is useful for much data too.
For large queries you could use “read only” “server side cursor” with “open forward” (with client side cursor are data is loaded and cached at the client)