网上看了很多数据库游标的知识,越看越疑惑。1.能不能举个例子说明一下,什么是数据库的游标?尽量简短的语言,解释清楚。2.为什么存储过程尽量不使用游标,大数据量的处理会特别耗性能呢?
学习是最好的投资!
A cursor can be understood as the subscript of an array, usually used for traversal. You can take a look at thishttp://blog.51yip.com/mysql/1...
A cursor is an abstract object expression of the data collection you select
I don’t know much about it1 Most of them are used for stored procedures to implement loops2 The performance is so slow that it will kill you. You can test this with 1 million data
I don’t know either, I’m looking for an answer
A cursor is a data buffer opened by the system for users to store the execution results of SQL statements.
I think it is particularly like the iterator in the Java collection framework. If you understand iterator, you should be able to understand cursor
A cursor can be understood as the subscript of an array, usually used for traversal.
You can take a look at this
http://blog.51yip.com/mysql/1...
A cursor is an abstract object expression of the data collection you select
I don’t know much about it
1 Most of them are used for stored procedures to implement loops
2 The performance is so slow that it will kill you. You can test this with 1 million data
I don’t know either, I’m looking for an answer
A cursor is a data buffer opened by the system for users to store the execution results of SQL statements.
I think it is particularly like the iterator in the Java collection framework. If you understand iterator, you should be able to understand cursor