• 关于COUNT STOPKEY的工作机制(转载)


    SQL> select rownum rn ,a.* from cnmir.ew_auctions a where rownum<50000;

    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 721966694

    ----------------------------------------------------------------------------------
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    ----------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | | 49999 | 4833K| 163 (2)| 00:00:02 |
    |* 1 | COUNT STOPKEY | | | | | |
    | 2 | TABLE ACCESS FULL| EW_AUCTIONS | 49999 | 4833K| 163 (2)| 00:00:02 |
    ----------------------------------------------------------------------------------

    SQL> select * from cnmir.ew_auctions where issue_id<80;

    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 518049957

    ---------------------------------------------------------------------------------
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    ---------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | | 1 | 99 | 1379 (2)| 00:00:17 |
    |* 1 | TABLE ACCESS FULL| EW_AUCTIONS | 1 | 99 | 1379 (2)| 00:00:17 |
    ---------------------------------------------------------------------------------

    可见COUNT STOPKEY 机制是只针对rownum而设定的!

  • 相关阅读:
    调度器30—调度相关结构体—struct rq Hello
    Linux内核机制—wait唤醒机制 Hello
    Java File I/O 操作 Hello
    【Linux】查端口 查进程
    【ElasticSearch】去掉重复数据
    【MySQL】优化
    【Java SE】时区,LocalDate,LocalDateTime
    【Redis】配置
    【VUE】neditor
    【VUE】json查看vuejsonviewer查件
  • 原文地址:https://www.cnblogs.com/future2012lg/p/3226575.html
Copyright © 2020-2023  润新知