Board index » delphi » Large data sets in MS SQL

Large data sets in MS SQL


2003-08-01 10:16:46 AM
delphi205
I am new to large datasets (>1 million records) and am having a hard time
processing/displaying the records without killing my Delphi application. I
am trying to allow a search engine-style navigation through the recordset
(eg. submit a query that produces 1 million matches, but return only the
first 20). All of the delphi controls appear to load the entire data set
into client memory before displaying the first entry. This causes my app to
crash with an out of memory exception.
I believe the answer is a server cursor. Is that true? Does anyone have
recommendations on good resources for learning about cursors?
Thanks,
Todd
 
 

Re:Large data sets in MS SQL

Todd,
This should give you a head start,
bdn.borland.com/article/0,1410,28160,00.html
Good luck,
krf
"Todd Giaquinto" <XXXX@XXXXX.COM>writes
Quote
I am new to large datasets (>1 million records) and am having a hard time
processing/displaying the records without killing my Delphi application.
I
am trying to allow a search engine-style navigation through the recordset
(eg. submit a query that produces 1 million matches, but return only the
first 20). All of the delphi controls appear to load the entire data set
into client memory before displaying the first entry. This causes my app
to
crash with an out of memory exception.

I believe the answer is a server cursor. Is that true? Does anyone have
recommendations on good resources for learning about cursors?

Thanks,
Todd


 

Re:Large data sets in MS SQL

What access layer are you using ?? ADO, BDE, DBExpress...
As far as I know, server cursors are only available with ADO.
If you're using ADO, then there's not much to learn. You just have to set
CursorLocation to clUseServer and avoid using pessimistic locking. By using
server cursors, however, you can no longer use local sorting and some
advanced filtering capabilities.
Also keep in mind that, whether you're using ADO, BDE or DBExpress, you
should never read the RecordCount property, as it implicitly fetches all
records to the client, no matter the cursor location.
Márcio
"Todd Giaquinto" <XXXX@XXXXX.COM>writes
Quote
I am new to large datasets (>1 million records) and am having a hard time
processing/displaying the records without killing my Delphi application.
I
am trying to allow a search engine-style navigation through the recordset
(eg. submit a query that produces 1 million matches, but return only the
first 20). All of the delphi controls appear to load the entire data set
into client memory before displaying the first entry. This causes my app
to
crash with an out of memory exception.

I believe the answer is a server cursor. Is that true? Does anyone have
recommendations on good resources for learning about cursors?

Thanks,
Todd