/Parke

Parke is a parser for 10053 Oracle trace files

Primary LanguagePython

Parke is a parser to 10053 trace files generated by Oracle

HOW TO RUN:

1) chmod +x parke.py

USAGE:

./parke.py -h

Parke [Oracle 10053 trace files parser] 
Usage: parke [OPTION] TRACEFILE OUTPUTFILE
Options are:	
  -e, --explain	explain plan and permutations for all statements



FILES:
Parke generates a JSON file with parsed information (OUTPUTFILE) from a valid 10053 Oracle trace file (TRACEFILE)


EXAMPLE:


./parke.py -e trace_examples/fenix2_ora_27794.trc teste.txt

Parsing trace_examples/fenix2_ora_27794.trc => teste.txt
All Done! File teste.txt created!
SQL Statements available (Ctrl+C exit):
1) 2u3gpxzm17b1z
Please enter your option: 1
Sql_id: 2u3gpxzm17b1z
Sql_text: select N2 from T_10053_TEST t1, T2_10053_TEST t2 where t1.A1 = t2.N1 and t2.N4 > 300 and t2.N4 < 400 and t1.A2 > 10
Permutations:
1)Join order[1]:  T2_10053_TEST[T2]#0  T_10053_TEST[T1]#1
2)Join order[2]:  T_10053_TEST[T1]#1  T2_10053_TEST[T2]#0
Best Join Order is: 1
Explain Plan:

-------------------------------------------+-----------------------------------+
| Id  | Operation           | Name         | Rows  | Bytes | Cost  | Time      |
-------------------------------------------+-----------------------------------+
| 0   | SELECT STATEMENT    |              |       |       |   842 |           |
| 1   |  HASH JOIN          |              |   23K | 1824K |   842 |  00:00:11 |
| 2   |   TABLE ACCESS FULL | T2_10053_TEST|   23K |  878K |   360 |  00:00:05 |
| 3   |   TABLE ACCESS FULL | T_10053_TEST |   93K | 3896K |   181 |  00:00:03 |
-------------------------------------------+-----------------------------------+