Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
What is happening under the hood to the selected data in a MySQL cursor?
I have a number of MySQL stored procedures that use a cursor to go through a select and then pass the results to other stored procedures one row at a time.
This can take a while to run, what is happening under the hood while the cursor is looping through? Is the select discarded and the results kept in memory or in a special temp table or something else?
The reason I ask is that I have had problems where between the start and the end data will get removed and then an insert will fail because of a foreign key relationship.
0 comment threads