[ODBC-196] Optimize ODBC-120 issue for the case of array fetch Created: 2018-11-04  Updated: 2019-09-24  Resolved: 2019-09-24

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: None
Fix Version/s: 3.1.5

Type: Bug Priority: Major
Reporter: Lawrin Novitsky Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 1
Labels: None


 Comments   
Comment by Dan Cory [ 2019-09-19 ]

Tableau uses array fetch of a forward only cursor, to read the data as quickly as possible.

Unfortunately the driver's implementation of array fetch causes the MySQL library to traverse its list of rows from the beginning, every time a new block is fetched. This becomes O(n^2) in the number of rows.

Since a user of a forward only cursor is always going to read the next block, the driver should be able to cache the cursor for the last row in the block and then move onto the next without starting again at the beginning.

Turning off Tableau's use of array fetch avoids this problem, but means more driver overhead since SQLFetch now must be called for every row.

Comment by Lawrin Novitsky [ 2019-09-24 ]

Connector does not do redundant data seeks in case of FORWARD_ONLY cursor. Also optimized other cursor types in case of array fetch, where it was possible.

Generated at Thu Feb 08 03:26:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.