Author: Laurent Schneider

SOUG-Tagung 09/2

I am impatient to speak in the swiss oracle user group next month March 18, 2009, Baden-Daettwil http://www.soug.ch I will be presenting an XML session regarding selecting XML from the database. select xmlserialize(document xmlcol) from agenda;   12:00 Empfang und Registrierung SOUG Sekretariat 12:30 Stehlunch im Foyer Seminarraum Schottky 13:00 21. Ordentliche Generalversammlung der SOUG, […]

high cost

What’s wrong with this query ? select (t6.column_value).getstringval() t6 from table(xmlsequence(extract(xmltype(‘<x/>’),’/x’))) t1, table(xmlsequence(t1.column_value))t2, table(xmlsequence(t2.column_value))t3, table(xmlsequence(t3.column_value))t4, table(xmlsequence(t4.column_value))t5, table(xmlsequence(t5.column_value))t6; T6 ———————— <x/> Elapsed: 00:00:00.01 Well, let’s check the plan : ——————————————————————– | Id | Operation | Rows | Bytes | Cost (%CPU)| Time | ——————————————————————– | 0 | SELECT STATEMENT | 18E| 15E| 18E (0)|999:59:59 | | […]

How to tune something doing nothing?

To end this year in glory, I tried to replace a row-level trigger (LSC_TR1) into a statement level trigger (LSC_TR2) SQL> create global temporary table lsc_t1(x number primary key) 2 on commit delete rows; Table created. SQL> create table lsc_t2(x number primary key); Table created. SQL> create table lsc_t3(x number primary key); Table created. SQL> […]

HOT

CREATE TABLE T(X NUMBER PRIMARY KEY) ORGANIZATION HEAP; I have read the SQL reference more than once -believe me- but I did not notice this syntax until today… an HOT table is a simple table and this clause is optional. An IOT, or INDEX ORGANIZED TABLE, is a table where you mostly select thru an […]

<CTRL> + .

Sometimes the simplest tricks just ease your life the nice way. While typing code in TOAD, I just found out those two handy keyboard shortcuts <CTRL> + . = Autocompletes tablenames <CTRL> + T = Popups the list of column names I want to select everything from emp and dept joined on deptno. SELECT*FROM E […]

select in HTML format, XQUERY variant

Same as Select in html format, but with XMLTABLE instead of XMLTRANSFORM select xmlroot( xmlelement( “table”, xmlconcat( xmltype( ‘<tr><th>DEPTNO</th><th>DNAME</th><th>LOC</th></tr>’), xmlagg(column_value) ) ),version ‘1.0’ ) from xmltable(‘ for $f in ora:view(“LSC_DEPT”) return <tr> <td>{$f/ROW/DEPTNO/text()}</td> <td>{$f/ROW/DNAME/text()}</td> <td>{$f/ROW/LOC/text()}</td> </tr>’); DEPTNO DNAME LOC 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON

Stored outlines

Note: Performance Tuning Guide Stored outlines will be desupported in a future release in favor of SQL plan management. In Oracle Database 11g Release 1 (11.1), stored outlines continue to function as in past releases. However, Oracle strongly recommends that you use SQL plan management for new applications. SQL plan management creates SQL plan baselines, […]

updatedb does not work with samba drives and cygwin

updatedb and locate are parts of the findutils package, which exists since a long time on most unix / linux flavors. Something I never get worked is to search for files on network drives with Cygwin, I always got : find: /cygdrive/y/Favorites/Links/del changed during execution of find (old inode number -474324984, new inode number -44545478 […]

Oracle Streams

If you have a datawarehouse and the data are getting to big for a full duplicate or tablespace transport, if you want to experience more about Streams or simply if you are in San Francisco and wants some distraction on Thursday after at 1pm, do not miss Chen session Oracle Streams – Live Demo Oracle […]

11g release 1 patchset 1

I just notice on Sven Blog that 11.1.0.7 is available. I have recently upgraded my connection at home so it took a bit less than half an hour to download this 1.5G patchset $ wget -O p6890831_111070_Linux-x86-64.zip http://oracle-updates.oracle… –10:17:40– http://oracle-updates.oracle.com/ARUConnect/p6890831_111070_Linux-x86-64.. Resolving oracle-updates.oracle.com… 87.248.199.23, 87.248.199.24 Connecting to oracle-updates.oracle.com|87.248.199.23|:80… connected. HTTP request sent, awaiting response… 200 OK […]