Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Loading datasets partially using Delphi 6 + SQL Server 7 ?

AjinsaAjinsa Member Posts: 28
I need help of how to
load a datasets partially using Delphi 6 ?
The DB server I use is SQL Server 7.

Condition :
===========
I have a table named Mstr_Member.
It has 1000000 ( A million records ).
It's crazy or even not possible to load them all at once.

Problem :
=========
I want to load them partially. For example, each 500 records.
For example, the first time load, shown 1 to 500.
Then, when I scroll down the cursor at TDBGrid, it could change
to 501-1000 or maybe 300-800.
So, It's always fast to load the table data.
Even it have a huge data, very huge data.

Thank's

Comments

  • MasterijnMasterijn Member Posts: 188
    : I need help of how to
    : load a datasets partially using Delphi 6 ?
    : The DB server I use is SQL Server 7.
    :
    : Condition :
    : ===========
    : I have a table named Mstr_Member.
    : It has 1000000 ( A million records ).
    : It's crazy or even not possible to load them all at once.
    :
    : Problem :
    : =========
    : I want to load them partially. For example, each 500 records.
    : For example, the first time load, shown 1 to 500.
    : Then, when I scroll down the cursor at TDBGrid, it could change
    : to 501-1000 or maybe 300-800.
    : So, It's always fast to load the table data.
    : Even it have a huge data, very huge data.
    :
    : Thank's
    :
    :
    Hi,
    Try using a serverside keyset cursor. With serverside cursors scrolling can be done on the server. (Scrolling is needed when displaying in a grid.) It could be that a scrollable serverside cursor needs a clustered index to work with (probably the keys for the keyset). Clientside cursors will finally suckup all data, so you can't use them memory efficient.

    Otherwise load data with a forward only, read only cursor in a more efficient data strucure. And then show this with a virtual listview. (1000000 * 60 byte is still managable, swapfiles are made for them)

    But then again, who can oversee a 1000000 of records? Ever considered filtering?


Sign In or Register to comment.