Switch to: V9V8V7V6V5

SELECT Few Columns

Let you have table T with, for example, 20 fields, and 10 million records of 200 bytes size. So the table size is 2GB.

Let you do:

  • curs_1 = db.SqlSelect( SELECT f1dInt FROM T, kServerSide );
  • curs_all = db.SqlSelect( SELECT * FROM T, kServerSide );

Server-side cursor is required here because client-side will not be able to load such huge data. Also let's agree that we are talking about LOCAL db here, because we do not want now to see overhead of network operations.

Question is:

what is the speed of scrolling of such cursors in the some TableView?

It`s important to remember, that Valentina has a vertical storage for tables. This means that curs_1 load from disk only fldInt, the rest 19 fields are NOT touched absolutely. In contrast curs_all loads from the disk the whole table 2GB. fldInt field has size 40Mb only. So we win 2GB / 40MB = 51.2 times !!

RULE: SELECT as few columns as possible to get faster working cursors.