Page 1 of 1

Question - traffic network with Select * from table and FetchRows = 25

Posted: Wed 25 Jul 2012 18:09
by rrcanalista
Hi, I have a question, if I have in one table about 1 milion of records and use the follow sql : Select * from table and fetchRows set to 25,40.

Question : how many records are returned ? 1 milion or the number of fetchrows property?

The next records will show while we get more records after end of table , this operation get the records from the memomory or get next records from database?

I'd like to know what the network traffic in this situation.

Thanks

Re: Question - traffic network with Select * from table and FetchRows = 25

Posted: Fri 27 Jul 2012 09:33
by AlexP
Hello,

The FetchRows property only produces an effect if the FetchAll option is set to false, in this case, for one call to the database, as many entries will be read out as it was specified in the FetchRows property, when scrolling to the next record (FetchRows+1) the next set of records will be returned. When setting these propertiesnetwork load decreases, as the data is read as needed. When changing the FetchRows value, significant performance improvement can be achieved. The optimum value should be chosen experimentally, as performance depends on a database, the server and client computer network settings.
If the FetchAll property is set to True, then, independendently on the FetchRows value, all the data from the table will be loaded to the client when opening the DataSet.