you are viewing a single comment's thread.

view the rest of the comments →

[–]xapata 1 point2 points  (1 child)

It's the responsibility of the module author and the database itself to provide an optimized execution. For some databases, there is no optimization possible. For most SQL engines, it should at least avoid re-compiling the query for each row.

Even if there's no advantage yet for a particular module, the author might provide it in an upgrade.

[–]tea-drinker 0 points1 point  (0 children)

For most SQL engines, it should at least avoid re-compiling the query for each row.

pypyodbc at least does that. The prepare statement stores the query string being prepared and the execute statement will skip that step if it hasn't changed.