Fetch data on demand

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
chris901
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Fetch data on demand

Post by chris901 » Thu 08 Sep 2016 17:26

Hello,

I am creating a test case table like this:

create table MuchData
(
MuchDataId serial,
string1 varchar(500),
string2 varchar(500),
string3 varchar(500),
string4 varchar(500),
string5 varchar(500),
string6 varchar(500),
string7 varchar(500),
string8 varchar(500),
string9 varchar(500),
string10 varchar(500),

primary key (MuchDataId)
)

and fill it with 1+ million rows


insert into MuchData
(string1,
string2,
string3,
string4,
string5,
string6,
string7,
string8,
string9,
string10)
select md5(random()::text) from generate_Series(1, 1000000) s;


When loading the data it takes very long (1+ minutes).

Thats understandable because it's a lot of data.

However in the PgSqlData settings I defined FetchAll = False.

Hot can i load data on demand and reduce the long waiting time?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Fetch data on demand

Post by Shalex » Tue 13 Sep 2016 15:44

If FetchAll=false, the number of rows fetched from database is determined by the DataGrid control the PgSqlDataTable instance is bound to.

You can check the current number of fetched records via RecordCount properties of your PgSqlDataTable (if QueryRecordCount=false).

Post Reply