[20230103]COUNT STOPKEY operation.txt
[20230103]COUNT STOPKEY operation.txt
--//連結:http://blog.tanelpoder.com/2010/10/25/count-stopkey-operation-the-where-rownum/
--//rownum限制僅僅顯示2^32-1條,實際上12c版本已經修復了這個bug,透過例子驗證.
1.環境:
SCOTT@test01p> @ver1
PORT_STRING VERSION BANNER CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0 12.2.0.1.0 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0
2.測試:
with sq as (select null from dual connect by level <= 2000)
select count(*)
from sq a, sq b, sq c;
COUNT(*)
----------
8000000000
with sq as (select null from dual connect by level <= 2000)
select count(*)
from sq a, sq b, sq c
where rownum <= 8000000000;
COUNT(*)
----------
8000000000
--//11g下重複測試:
3.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
4.測試:
with sq as (select null from dual connect by level <= 2000)
select count(*)
from sq a, sq b, sq c;
COUNT(*)
----------
8000000000
with sq as (select null from dual connect by level <= 2000)
select count(*)
from sq a, sq b, sq c
where rownum <= 8000000000;
COUNT(*)
----------
4294967295
--//很明顯11.2.0.4存在這個bug.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2933490/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20180725]index skip-scan operation.txtIndex
- MySQL的COUNT語句--count(*)、 count(常量)、 count(列名)MySql
- count(*)、count(1)和count(列名)的區別
- count (*) 和 count (1) 和 count (列名) 區別
- count(*) 和 count(1)和count(列名)區別
- 圖解MySQL:count(*) 、count(1) 、count(主鍵欄位)、count(欄位)哪個效能最好?圖解MySql
- [20180727]再論count(*)和count(1).txt
- 7.65 COUNT
- MySQL:count(*) count(欄位) 實現上區別MySql
- SQL Server中count(*)和Count(1)的區別SQLServer
- Count BFS Graph
- count(*) 優化優化
- 204. Count Primes
- Leetcode 38 Count and SayLeetCode
- std::count 函式函式
- 7.36 BITMAP_COUNT
- 7.13 APPROX_COUNTAPP
- 解析Count函式函式
- C# 中List中的Count和Count(),有什麼區別C#
- mysql count()的使用解析MySql
- MySQL:SELECT COUNT 小結MySql
- 7.14 APPROX_COUNT_DISTINCTAPP
- MySQL優化COUNT()查詢MySql優化
- [LeetCode] 811. Subdomain Visit CountLeetCodeAI
- 21:Count Down設計模式設計模式
- 7.15 APPROX_COUNT_DISTINCT_AGGAPP
- 7.16 APPROX_COUNT_DISTINCT_DETAILAPPAI
- count 函式原始碼分析函式原始碼
- 關於_rollback_segment_count
- [ABC221H] Count Multiset
- itertools.count() function in Python 3FunctionPython
- 【Leetcode】1395. Count Number of TeamsLeetCode
- 【Lintcode】1006. Subdomain Visit CountAI
- pymysql.err.OperationalError: (1136, “Column count doesn‘t match value count at row 1“)報錯反省。MySqlError
- word_count的scala學習
- CSS3 animation-iteration-countCSSS3
- P2633 Count on a tree 題解
- [20190419]shared latch spin count.txt