0

I'm using MySQLdb for Python 3.6 to store some data in a database. I have avoided using cursors as per this discussion to avoid the performance hit. However, I am not seeing a good way to parameterize my data unless I use a cursor.

My question is: is there a way to parameterize data on a set based operation, or do I need to choose between using a cursor vs. sanitizing my own data?

Barmar
  • 741,623
  • 53
  • 500
  • 612
spideyclick
  • 162
  • 1
  • 1
  • 12
  • 2
    I think that's confusing two types of cursor. One is to iterate through result sets, the other is just as a type of connection. Using cursors to arbitrarily rather than sequentially step through result sets is where you have trouble. The slow cursor is [`CURSOR`](https://dev.mysql.com/doc/refman/8.0/en/cursors.html). – tadman Oct 02 '19 at 20:13
  • 1
    I appreciate that! Sounds like I need to broaden my knowledge of SQL a little! I'll do some looking. Sounds like I'm safe to use the cursor for my query at least! – spideyclick Oct 04 '19 at 19:18

0 Answers0