EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB441500: MySQL Data Import error: “Memory consumption limit during data fetching is exceeded”


Community Admin

• Strategy


The following knowledge base article provides a fix if the following error is encountered while importing large datasets from MySQL using the MySQL ODBC Driver: “Memory consumption limit during data fetching is exceeded” The fix is to update the DSN or the connection string for MySQL to use forward only cursors and to not cache the results.

This article address the following error:

ka04W000000OarKQAS_0EM44000000Wgun.png

Table of Contents

  • Connectivity on Windows I-Server
    • DSN Connection
    • DSN-less Connection
  • Connectivity on Linux I-Server

 

Connectivity on Windows I-Server

DSN Connection

  • Open ODBC Data Source Administrator
  • Click on System DSN > Select the MySQL ODBC Driver DSN that is in use and select Configure.
ka04W000000OarKQAS_0EM44000000Wgus.png
  • In the MySQL Connector/ODBC Data Source Configuration screen, select Cursor/Results and check the following two settings:
  1. Don’t cache results for forward-only cursor
  2. Force use of forward-only cursors
ka04W000000OarKQAS_0EM44000000Wgux.png

 

DSN-less Connection

If you are using a DSN-less connection in Web, then click on the small black arrow on the right of the Data Source name and select Edit.

ka04W000000OarKQAS_0EM44000000Wgv2.png

 
Check “Edit Connection String” and set the parameters FORWARD_CURSOR and NO_CACHE to 1. Click on OK.

ka04W000000OarKQAS_0EM44000000Wgv7.png

 

Connectivity on Linux I-Server

Open the opt/mstr/MicroStrategy/odbc.ini file
Search for your MySQL Data Source within the text. Enter the following two lines at the end of it:
FORWARD_CURSOR=1
NO_CACHE=1

ka04W000000OarKQAS_0EM44000000WgvC.png

 

According to the MySQL official documents, please refer to below parameter description to use prefetch, forward only cursors and no cache parameter for MySQL.
 

Explanation of the parameter options


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Parameter NameDefault ValueDescriptionPREFETCHBalance the value based on data sizeWhen set to a non-zero value N, causes all queries in the connection to return N rows at a time rather than the entire result set. Useful for queries against very large tables where it is not practical to retrieve the whole result set at once. You can scroll through the result set, N records at a time.
This option works only with forward-only cursors. It does not work when the option parameter MULTI_STATEMENTS is set. It can be used in combination with the option parameter NO_CACHE.FORWARD_CURSOR0Force the use of Forward-only cursor type. In cases of applications setting the default static/dynamic cursor type and one wants the driver to use noncache result sets, this option ensures the forward-only cursor behavior.NO_CACHE0Do not cache the results locally in the driver, instead read from server (mysql_use_result()). This works only for forward-only cursors. This option is very important in dealing with large tables when you do not want the driver to cache the entire result set.


Comment

0 comments

Details

Knowledge Article

Published:

August 8, 2018

Last Updated:

November 21, 2018