网上看了很多数据库游标的知识,越看越疑惑。
1.能不能举个例子说明一下,什么是数据库的游标?尽量简短的语言,解释清楚。
2.为什么存储过程尽量不使用游标,大数据量的处理会特别耗性能呢?
大家讲道理2017-04-18 09:40:08
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...
巴扎黑2017-04-18 09:40:08
A cursor is an abstract object expression of the data collection you select
巴扎黑2017-04-18 09:40:08
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
伊谢尔伦2017-04-18 09:40:08
A cursor is a data buffer opened by the system for users to store the execution results of SQL statements.
大家讲道理2017-04-18 09:40:08
I think it is particularly like the iterator in the Java collection framework. If you understand iterator, you should be able to understand cursor