Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stata terminates on a large SQL query (APPCRASH).

    I have repetitively observe the following with Stata 13.0 (521.13.0.164 on Windows): An SQL query to a MySQL database (via 'MySQL ODBC 5.3 ANSI Driver') resulting in a large volume of data may collapse Stata (APPCRASH). It actually crashes it every time:



    The same query ran from the MySQL Workbench results in a message "Error code: 2008. MySQL client ran out of memory" and the MySQL Workbench survives:



    Retrieving a limited set of data works fine and Stata manages the subset well. It is possible to read in all the data, but it has to be done gradually then.
    I wonder if any of the updates have dealt with proper error handling in Stata after version 13.0 (none of the ODBC/SQL changes mentioned here seem to cover it).

    Thank you, Sergiy Radyakin

  • #2
    I have given up using Stata to submit SQL queries because of unexpected termination and/or suspension (Stata hangs). I have found examples where submitting the query via TerraData or SAS takes a fifteen minutes and returns a few thousand records (not a large dataset), but Stata terminates before completion. This doesn't really answer your question, as there aren't any error messages involved, just reinforces your belief that it is a Stata issue.

    On the other hand, I also found an example where submitting the same SQL query via SAS hung up SAS but not Stata - the reason was that SAS was retrieving a string field that was 1 character and storing it as 128kb string (so the dataset ate up every bit of disk space before crashing the entire system). But I have learned to recast all strings as having a fixed length to get around this.

    Jeph


    Comment


    • #3
      If you haven't done so already, you might want to put these through to technical support. Both the memory exhaustion and time-out problems sound like fixable bugs.

      Comment

      Working...
      X