java - 一句话解释一下,什么是数据库中的游标?
PHPz
PHPz 2017-04-18 09:38:08
0
6
442

网上看了很多数据库游标的知识,越看越疑惑。
1.能不能举个例子说明一下,什么是数据库的游标?尽量简短的语言,解释清楚。
2.为什么存储过程尽量不使用游标,大数据量的处理会特别耗性能呢?

PHPz
PHPz

学习是最好的投资!

reply all(6)
大家讲道理

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template