0

I'm on Python 2.7 (sigh) and MySQL 5.6.23.

I need to retrieve a lot of data from MySQL using Python.

I read about SSCursors, and I also saw something about creating a paginated query (stored procedure in my case).

Apparently SSCursors have pluses and minuses, as perhaps do paginated queries.

SSCursors don't appear to like concurrency - when using an SSCursor, you can only have one query in flight at a time (?). Also, they appear to be less than portable?

And with paginated queries, I have to wonder what would happen if relevant tables were modified During the query - would you possibly miss a row or get a duplicate row? Also with paginated queries, I heard that the last page of data takes time proportionate to the entire query, so they might not help me much?

So what's better - SSCursors or Paginated SP's/Queries? And is the above stuff true?

How to efficiently use MySQLDB SScursor? is useful and one of my source documents, but does not appear to address paginated queries or portability.

How to get a row-by-row MySQL ResultSet in python is closer. I added a comment there about the portability of what's discussed.

Community
  • 1
  • 1
dstromberg
  • 6,954
  • 1
  • 26
  • 27

0 Answers0