One or the other or both will be fine
SQL> set autotrace traceonly explain
SQL> select * from v$sqlarea where sql_id = 'blah';
Execution Plan
----------------------------------------------------------
Plan hash value: 2878698642
-----------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 20164 | 0 (0)| 00:00:01 |
|* 1 | FIXED TABLE FIXED INDEX| X$KGLCURSOR_CHILD_SQLID (ind:2) | 1 | 20164 | 0 (0)| 00:00:01 |
-----------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("KGLOBT03"='blah' AND "KGLOBT02"<>0 AND "INST_ID"=USERENV('INSTANCE'))
SQL> select * from v$sqlarea where hash_value = 123123;
Execution Plan
----------------------------------------------------------
Plan hash value: 1696808874
-----------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 20164 | 0 (0)| 00:00:01 |
|* 1 | FIXED TABLE FIXED INDEX| X$KGLCURSOR_CHILD_SQLID (ind:1) | 1 | 20164 | 0 (0)| 00:00:01 |
-----------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("KGLNAHSH"=123123 AND "KGLOBT02"<>0 AND "INST_ID"=USERENV('INSTANCE'))