I recently had a performance issue in Siebel 7.8 that on brief inspection looked like a SQL issue: the application was taking forever to build a list applet, re-query was just as slow, there weren’t any obvious calculated fields, no dodgy MVGs etc etc… it all pointed at the database.
So I did the obvious thing and spooled the SQL. Sure enough, the applet query was taking nearly 30 seconds to complete. Next step, fire up Toad to get an explain plan and start picking apart the SQL. Except when I pasted my query into Toad, it completed in half-a-second. The explain plan showed perfect use of the expected unique index scans, with no full table scans or other anomalies. Why the discrepancy?
After a bit of digging around, the answer came from our often-invaluable TAM: SupportWeb TechNote 582. The technote has all the background to the Cost Based Optimizer, and the key is the explanation of Siebel’s Oracle session variables. In summary, to make your SQL client behave like a Siebel session, you need to set the following session variables:
ALTER SESSION SET optimizer_mode = FIRST_ROWS_10
/
ALTER SESSION SET "_HASH_JOIN_ENABLED" = FALSE
/
ALTER SESSION SET "_OPTIMIZER_SORTMERGE_JOIN_ENABLED" = FALSE
/
ALTER SESSION SET "_OPTIMIZER_JOIN_SEL_SANITY_CHECK" = TRUE
/
In Toad, you add these statements and choose to ‘Execute as script’. The really significant variable here is that first one: optimizer_mode = FIRST_ROWS_10. This tells Oracle to optimize for the first page, rather than the whole query, which can dramatically change the way indexes are evaluated.
In my case, the session variables allowed me to replicate the slow performance of the query in Toad, the explain plan of which showed Oracle using the wrong index, which identified the incorrect evaluation of costs, which (eventually) pointed to a root cause of stats being generated on empty tables. Obviously!
October 16th, 2007
A new Siebel web resource… The Oracle Technical Network have recently added Community Discussion Forums for Siebel (you’ll need to sign up for free membership of TechNet).
Early days on the discussion pages, but in time I’d expect this to replace ITToolbox as the default destination for Siebel queries. I’ll be keeping an eye on the Siebel Technology thread and hoping to learn a few things.
(via both Andy and Graham)
October 4th, 2007
Things have been quiet around here while I’ve been on vacation, but a little side project I’ve been involved with has been barrelling along: I’m very pleased to be able to say that Siebel User Group Australia is up-and-running.
I’ve mentioned before my feeling that Siebel is severely lacking in good community support, at least in Sydney, and compared with other similar technology specialisations. Turns out that I’m not the only one with that sentiment. Driven largely by the enthusiasm of David Wong, a small group of us have been meeting for a couple of months to try and get a ‘grassroots’ movement happening. Sounds like some kind of revolution!
The outcome is SUGA, a new organisation that will hopefully become a catalyst for ongoing Siebel community events, networking and knowledge sharing. To kick things off, we’ve planned two evening events for the upcoming months. This coming Thursday’s “Siebel Upgrade Strategies” panel is already oversubscribed - a promising sign! - so register early for November’s “Siebel 8.0 Upgrade Case Study”.
For those in Sydney, hope to see you Thursday. I’ll be the skinny bloke at the front kicking off the whole shebang, then disappearing into the background while the real experts do their thing…
September 24th, 2007
This one caught me out just recently while I was building a business process to poll a service every couple of seconds. Seemed simple enough: add a Wait Step to my flow, set MeasureUnit to Seconds and duration to 1, then call my service and loop back to the Wait under certain conditions. In my example I want the flow to fail if the service doesn’t complete after half a dozen attempts, so I set the Maximum Iterations property on the service step to 6 and handled the error that occurs on the 7th attempt. The workflow should run synchronously in the Application Object Manager, with the UI waiting for a response.
According to all documentation this should have worked, but instead the workflow was immediately returning a response to the UI the first time it hit the Wait Step. The workflow was continuing on exactly as expected in the background, but it appeared that Siebel was automatically persisting the workflow, making the flow asynchronous.
Took a bit of digging around, but the solution was to change the Mode of the business process. In Interactive Flow or Service Flow mode the Wait step causes the flow to move out of the UI context, but in good old 7.0 Flow compatibility mode it works as expected, blocking the UI until the workflow completes.
Doesn’t fit in very well with Siebel’s mandate of not creating new 7.0 Flows, but what can you do when there are bugs..?
August 17th, 2007
The browser script Control method ‘SetProperty’ is fairly limited: it only works at all with CheckBox, ComboBox, TextBox and TextAreas, and even with these controls I’ve found behaviour to be flaky. In my experience it’s more reliable to grab a handle to the control and access the DOM properties directly.
For instance, to conditionally show or hide a control using browser script, the code looks like this:
var ctrl = thisApplet.FindActiveXControl("My Control");
if( ctrl != null )
{
if( myFlag )
ctrl.style.visibility="visible";// show control
else
ctrl.style.visibility="hidden";// hide control
}
This approach can also be used to set other display properties - like the font and colors - but you have to be a bit more careful with interactive properties: the standard HTML property disabled does not work the same as Siebel’s Enabled control property, for instance.
The best reference I’ve found to the complete set of DOM properties is on MSDN, with the advantage that everything here should be available to Siebel’s IE-only environment.
July 30th, 2007
Next Posts
Previous Posts