Query with a strange(?) behaviour...
Hi,
I run this query in our TEST:
SQL> alter system flush shared_pool;
System altered.
Elapsed: 00:00:01.16
SQL> alter system flush buffer_cache;
System altered.
Elapsed: 00:00:00.85
SQL>
SQL>
SQL> SELECT count(R0.iTransactionSeqNo) FROM neotest.LdxReceipt R0 WHERE (((R0.iTransactionSeqNo <> 0) AND (R0.tsAggCalc IS NULL)));
Elapsed: 00:00:12.64
Execution Plan
----------------------------------------------------------
Plan hash value: 3340530274
---------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 20 | 76576 (2)| 00:15:19 |
| 1 | SORT AGGREGATE | | 1 | 20 | | |
|* 2 | TABLE ACCESS FULL| LDXRECEIPT | 20423 | 398K| 76576 (2)| 00:15:19 |
---------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - filter("R0"."TSAGGCALC" IS NULL AND "R0"."ITRANSACTIONSEQNO"<>0)
Statistics
----------------------------------------------------------
178 recursive calls
0 db block gets
276112 consistent gets
275883 physical reads
0 redo size