Bash script to check for final closing /data xml tag in file

Bash script to check for final closing </data> xml tag in file: if [ -f file.xml ] then # if grep -1iq ‘</data>’ file.xml # simplest syntax # if tac file.xml | grep -1iq ‘</data>’ # faster syntax (tac is reverse cat) if tail -100 file.xml | grep -1iq ‘</data>’ # fastest syntax, assumes at […]

Read More Bash script to check for final closing /data xml tag in file
June 23, 2015

One Comment

List oracle indexes and their columns with listagg

List indexes on large tables, with listagg to show the indexed columns in a comma separated line, and outer join to include tables with no indexes: SELECT t.owner , t.table_name , ROUND ( t.blocks * 8 / 1024 / 1024 ) AS gb — assuming each block is default 8kb , t.num_rows , i.index_name , […]

Read More List oracle indexes and their columns with listagg
June 17, 2015

Oracle distributed query join over remote database link slow performance leading driving_site hint fix

Oracle Optimizer doesn’t cope so well with distributed queries, joining to tables in different databases. 1) The leading and/or driving_site hints can dramatically improve distributed query performance. SELECT /*+ leading(tab1) driving_site(tab2) */ … FROM table1 AS tab1 JOIN table2@db2 AS tab2 … Driving_site specifies the database you want doing the bulk of the work, likely […]

Read More Oracle distributed query join over remote database link slow performance leading driving_site hint fix
June 16, 2015

Oracle User Group Scotland Conference 2015

Oracle User Group Scotland Conference 2015 1) SQLcl (SQL command line) new enhanced SQL*Plus, easy to output index info, DDL, output/load data in csv, xml. Early adopter (beta) version available for download now, production version expected soon and to be bundled by default into Oracle 12cR2. More at Kris Rice. 2) Relax and Recover Martin […]

Read More Oracle User Group Scotland Conference 2015