Month: December 2005

Merry Christmas

Well, it’s nearly christmas day here in the UK…the pressies are all under the tree, the food and drink is all bought and planned and I’m quite When a man suffers from the condition, he loses ability to develop erections sufficient for an on line viagra http://greyandgrey.com/wp-content/uploads/2018/07/Maddox.pdf intercourse activity. You don’t have to step one foot outside of your soft tadalafil home . Now, this is one of the most interesting restaurants here: Pressure Billiards & Cafe If you would like to enjoy yourself while eating and socializing, then Pressure Billiards & Cafe cheap viagra without prescriptions is the perfect place for you. One other reason for melancholy is often unhealthy experience: the loss of life of somebody important, loss of something vital, to related disagreeable order cheap viagra knowledge that will hang-out an individual to produce a long term solution for certain typical male sexual dysfunctions. “merry” myself already!

I wish you all a Merry Christmas and a Happy New Year – that’s my last words for 2005!

Cheers!
Jeff

V$SQL_PLAN bug in 10gR1

I’ve been working on trying to determine where long running queries are at and came across a problem today with V$SQL_PLAN on HP-UX 10gR1
(10.1.0.4.0) that I thought I’d share with you…

Essentially, I was trying to go into V$SQL_PLAN for the problem query, joining up the PARENT_ID and ID columns using CONNECT BY when I discovered that it wasn’t joining things up correctly. Further investigation showed that some of the entries in the table had PARENT_ID values which did not relate to any ID values and could therefore not be CONNECTed BY any means…I’ve since raised a TAR – sorry, Service Request (SR) on the super new whizzy Metalink and the response from Oracle was that it was indeed a bug.

I did some searching on Metalink and the forums and found that there have been problems with V$SQL_PLAN before where the support recommendation was that the problem was fixed in later releases and that a workaround was to just use EXPLAIN PLAN or:

select * from table(dbms_xplan.display_cursor(‘&sql;_id’))
/

For the given SQL_ID – if the plan is still in memory.

It’s always wise before going to Support with a problem to come up with a test case in my view…they will end up asking for one anyway and it’s perfectly reasonable to do so. Here’s the one that I logged with them:

drop table test1;
drop table test2;
create table test1(col1 number, col2 number,col3 number,col4 varchar2(20)); insert into test1 values(1000,2000,3000,’AAA’); insert into test1 values(1001,2000,3001,’BBB’); insert into test1 values(1002,2001,3000,’CCC’); create table test2(col5 number, col6 varchar2(20)); insert into test2 values(2000,’DDD’); insert into test2 values(2001,’EEE’); commit;

WITH i1 AS
(
select /*+ no_merge materialize */ t1.col1
,t1.col2
,t1.col3
,t1.col4
from test1 t1
, test2 t2
where t1.col2 = t2.col5
and t1.col3 = 3000
)
, i2 AS
(
select /*+ no_merge materialize */ t1.col1
,t1.col2
,t1.col3
,t1.col4
from test1 t1
, test2 t2
where t1.col2 = t2.col5
and t1.col3 = 3001
)
select i1.col1
, i1.col2
, i1.col3
, i1.col4
, i2.col4
from i1
, i2
where i1.col2 = i2.col2
/

select operation,id,parent_id,depth,position from v$sql_plan where sql_id=’fj03rbvgpqrp6′ order by id /

On 10gR1 on HP-UX I’m getting duff entries in the output:


OPERATION ID PARENT_ID DEPTH POSITION

SELECT STATEMENT 0 0 127
TEMP TABLE TRANSFORMATION 1 0 1 1
HASH JOIN 10 1 2 1
VIEW 11 10 3 1
TABLE ACCESS 12 11 4 1
VIEW 13 10 3 2
TABLE ACCESS 14 13 4 1
LOAD AS SELECT 15 1 2 2
HASH JOIN 16 2 3 1
TABLE ACCESS 17 3 4 Regular intake of 4T Plus capsule strengthens the muscles surrounding the viagra in italy male genitals. appalachianmagazine.com cheap cialis generic Learning proper breathing techniques is essential for maintaining a healthy weight, and avoiding the use of liquor, nicotine and substance use. commander viagra Some people have medical issues and this means they cannot have the chance of using the product. continue reading this link tablet viagra Vital HGH is designed to treat the symptoms of aging which are affecting your performance in bed. 1
TABLE ACCESS 18 3 4 2
LOAD AS SELECT 19 1 2 3
HASH JOIN 20 6 3 1
TABLE ACCESS 21 7 4 1
TABLE ACCESS 22 7 4 2

Notice that there are no ID’s 2,3,6 or 7 and therefore the PARENT_ID’s with those values are plain wrong.

Interestingly, on my 10gR2 on XP at home this worked fine so they probably fixed it in going to 10gR2 me thinks:




OPERATION ID PARENT_ID DEPTH POSITION

SELECT STATEMENT 0 0 14
TEMP TABLE TRANSFORMATION 1 0 1 1
LOAD AS SELECT 2 1 2 1
HASH JOIN 3 2 3 1
TABLE ACCESS 4 3 4 1
TABLE ACCESS 5 3 4 2
LOAD AS SELECT 6 1 2 2
HASH JOIN 7 6 3 1
TABLE ACCESS 8 7 4 1
TABLE ACCESS 9 7 4 2
HASH JOIN 10 1 2 3
VIEW 11 10 3 1
TABLE ACCESS 12 11 4 1
VIEW 13 10 3 2
TABLE ACCESS 14 13 4 1

The PARENT_ID and ID’s CONNECT up no problem now.

This is a bit of a pain cos I need it to work really for my “where is my query at” efforts….grrrr! Given it only fails in this way infrequently and for certain types of query (in my example where there are numerous TEMP TABLE TRANSFORMATIONs) I think I’ll just live with it as a feature in my script.

How do I find out where my query is at ? Part II

I wrote about how to find out the operation id which a given query was executing recently…with the upshot that it was difficult, if not impossible to determine definitively which operation within a given execution plan a query was executing at any given point in time here.

I’ve since written a better query which at least gives a better picture of where the query is at – don’t get me wrong, it’s still a long way from perfect, but at least it’s getting closer to where it needs to be…

The script is here.

Basically, I join v$session, v$open_cursor, v$sql_plan, v$sqlarea, v$sql_workarea, v$sql_workarea_active and v$sesion_longops to get a more accurate picture of where things are at.

It’s not perfect since there are still occasions when Oracle is performing a particular step in the execution path and I can’t determine where Under normal circumstances, Tadalafil is taken once a day, or as prescribed by your doctor, about 60 minutes before any planned sexual activity. cheap canadian viagra Women can consume levitra 60 mg Gynecure capsules to avoid genital problems. Not long ago, a 50 year-old sildenafil online purchase man, who I’ll call John, came to me with congestive heart failure. The best news is that viagra generico 5mg is available to all men above the age of 18. it is, e.g. the final transaction part when it’s a DML statement…but it’s better than anything I’ve managed before.

I still believe there is no simple, definitive way of determining this information as of 10g R2…please tell me if you’re better informed!

Your comments on improving it would be most welcome…particularly since I’m going to include something on this in the presentation I’m giving in January to the BIRT SIG – yes, I’m quite nervous at giving my first presentation in front of more than 3 people thank you very much!

I’ve managed to secure the assistance of a number of trusted friends and associates to review what I produce for the presentation…my thanks to them in advance.

On a different note, I’ve just started reading the Oak Table Insights book which is thoroughly entertaining not to mention full of insight.

Presentation Agenda: Five Tuning Tips For Your Data Warehouse, UKOUG BIRT SIG, 31st January, 2006

So, the agenda for my presentation at the UKOUG BIRT SIG on January 31st is going to be something like this:

Abstract: Just like OLTP systems, Data Warehouse performance can be affected by a myriad of factors. This presentation will cover Five key areas which can have a significant impact on warehouse performance:

  • Make the most of your memory
  • Partition for performance & manageability
  • Squeeze your data with segment compression
  • Beware Of Temporal Data Affecting The Optimizer
  • Find Out Where Your Query Is At

What other first aid tips do you think should be mentioned? Leave us a reply and let us know! Importance viagra for cheap prices of pet health supplements Good nutrients are not enough for your pet’s good health. The medication is not intended for use by women or by viagra levitra cialis children. Due to its numerous benefits, Chiropractic therapy can have diverse http://greyandgrey.com/wp-content/uploads/2018/07/Jansch.pdf best viagra pills applications both in the world of sports and exercise-related injuries. Those who suffer from the following cost of cialis should consult their doctor before using this medicine.
Each of these are major topics in their own right so I’m not going to cover an enormous amount of ground with each, but I will try to cover some key points and include a demonstration or two along the way.

I’ll be putting the slides together over the next few weeks so I guess I’ll be posting less (already have been…but that’s due to this man flu still hanging around).

I have come across a couple of interesting things along the way already mind:

Firstly, I was trying to tune a Materialized View the other day when I encountered something which made me laugh. I extracted the DDL from Toad and tried to do an explain plan on it…only to discover that it rewrote the query using the Materialized View – well, of course, it would, wouldn’t it! In order to tune it you need to add the NOREWRITE hint.

My colleague Anthony Evans encountered a similar problem afterwards when trying to tune a query which referred to a view which was undergoing a Materialized View Rewrite when he didn’t want it to. The solution he found in this case was to use the NO_QUERY_TRANSFORMATION hint to instruct the optimizer to skip all query transformations.

The next thing I discovered was when building a test script to test compression out. I was doing a series of INSERT /*+ APPEND */ operations with COMMITs after them which was working fine. Then I added SET AUTOTRACE ON at the start of the script so I could start to see the execution plans and statistics but unfortunately this resulted in this error:

ORA-12838: cannot read/modify an object after modifying it in parallel

The AUTOTRACE is doing some more DML after the INSERT /*+ APPEND */ but before the COMMIT…which is not allowed when using the APPEND and so it breaks.

I resorted to using SET AUTOTRACE ON STATISTICS instead since I wasn’t too interested in the execution plan anyway. I guess I could have used tracing and tkprof if I’d wanted to see the execution plans as well.