search

Home  >  Q&A  >  body text

java - 一句话解释一下,什么是数据库中的游标?

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

PHPzPHPz2893 days ago443

reply all(6)I'll reply

  • 大家讲道理

    大家讲道理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...

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 09:40:08

    A cursor is an abstract object expression of the data collection you select

    reply
    0
  • 巴扎黑

    巴扎黑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

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 09:40:08

    I don’t know either, I’m looking for an answer

    reply
    0
  • 伊谢尔伦

    伊谢尔伦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.

    reply
    0
  • 大家讲道理

    大家讲道理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

    reply
    0
  • Cancelreply