[thelist] ameteur site URLOTD (was Re: Client Relations Re: 'design by..' line)

Adam Patrick apatrick at oracular.com
Fri Jul 7 16:02:08 CDT 2000


> >I think that the sign
> >of an
> >amateur site is the counter (especially the freebie counter), and the stolen,
> >animated email gif...
> +1 on that one...

Just for Fun....

http://farmer.oracular.com/

If you like: tell ALL your friends!

I know, I know, this post deserves the mother of all tips, so here it
is....

<tip type="Oracle SQL">
Use Explain plan to find out if your queries are being executed using
the best indexes, etc...then fine tune them!

SQLNavigator has a nice explain plan tool but if you are SQLNav
deficient this script works great in SQL*Plus and with a few mods could
work elsewhere.

<script>
set echo on

delete from plan_table
where statement_id = 'ELP';
commit;

COL operation FORMAT A30
COL options FORMAT A15
COL object_name FORMAT A20

EXPLAIN PLAN set statement_id = 'ELP' for
/* enter your own complicated and/or inefficient SQL statement here...
*/
select  count(*)
from arminvhead b, arminvline a
where b.oectltype = upper('SO' )
and b.shpdate between to_date('01/2000','mm/yyyy') and
     add_months(to_date('01/2000','mm/yyyy'),1)-1
and b.co = 'PSG'
and b.whse = '540'
AND (B.SHPDATE - B.ORDRDATE) between 3 and 4
and B.CUSTOMER = '000078'
and a.co = b.co
and a.oectltype = b.oectltype
and a.orderno = b.orderno
and a.backorderno = b.backorderno
and a.whse = b.whse
and a.invoice = b.invoice
and a.qtyship > '0'
/* end your SQL statement here and don't forget the 
   slash on the next line */
/

set echo off


select operation, options, object_name
from plan_table
where statement_id = 'ELP'
start with id = 0
connect by prior id=parent_id AND PRIOR STATEMENT_ID = STATEMENT_ID;
set echo on

</script>

</tip>




More information about the thelist mailing list