Switch to: V12V11V10V9V8V7V6V5

SELECT Few Columns

Let you have table T with, for example, 20 fields, and 10 million records of 200 bytes size. So 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 load such huge data. Also let's agree that we talking about LOCAL db here, because we do not want now see overhead of network operations.

Question is:

what will be speed of scrolling of such cursors in the some TableView?

Important now to remember, that Valentina has a vertical storage for tables. This means that curs_1 will load from disk only fldInt, rest 19 fields will NOT be touched absolutely. In contrast curs_all must load 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.