0

Table has a total of 1,120,000 rows and 20 columns. When I run a select query on mysql directly like:

select * from <tablename> where UpdatedOn > '2020-10-05'

it gives the results which is about 50+ rows.

But when I run the same from MSSQL using ODBC Connection it throws "MySQL Client Out of Memory" every single time.

  • The server has 8 GB RAM and no one else is using the server
  • Running Select top gives the results without the error
  • Running select with a single integer column like select id from ... throws a "MySQL Client out of memory"

What could be going wrong? I haven't been able to the issue.

4
  • How is "UpdatedOn" defined in the MySQL DB? Oct 6, 2020 at 19:41
  • @GerardH.Pille UpdatedOn is a field with type datetime Oct 7, 2020 at 2:15
  • What versions of MSSQL and ODBC? Your MySQL could do with an update. Oct 7, 2020 at 10:07
  • @GerardH.Pille mysql Ver 14.14 Distrib 5.7.31 Oct 7, 2020 at 16:43

1 Answer 1

0

The comparison of datetime with a string may cause odbc to retrieve the entire table before eliminating rows. Either compare with a datetime constant or set the prefetch parameter in the odbc config to a reasonable value.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.