Optimizing DAS queries

Hello everyone

Currently, our installation uses the 3.1. batch scheduling system on an Oaracle database, which allows queries to be optimized fairly easily by modifying the SQL_BATCH table. Some queries will not run unless they are optimized, and my fear is that when we move to version 4.1, we will lose the ability to optimize queries.

Does anyone know a way to capture the SQL when a query is submitted to DAS, or force an optimize hint to the SQL, possibly for certian user id’s?

Thanks in advance for any help.


Listserv Archives (BOB member since 2002-06-25)

In a message dated 98-08-07 16:59:11 EDT, you write:

Does anyone know a way to capture the SQL when a query is submitted to
DAS, or force an optimize hint to the SQL, possibly for certian user id’s?

Unfortunately, 4.x DAS does not work the same way as the 3.1 batch feature. Under DAS, the SQL is not submitted - the document is. And since you can’t find the SQL in the document, there is no way to edit or otherwise process it prior to running the schedule. (There may be a way with scripting, but I am not familiar with all of the scripting features.)

This is a major departure from the way batch used to work. Under 3.1 batch processing, only the SQL was sent to the server. It required a UNIX server to process the scripts, so other platforms were not supported. (Although I imagine you could work up a substitute.) The data was captured from the SQL (via a CREATE TABLE AS… statement) and stored in a temporary database table. Importing the results simply was a matter of selecting rows from the temporary table and downloading them into the report on the client workstation.

Now to Document Agent… instead of sending SQL you send the complete document. There is a server configured with DAS… which is essentially a big schedule monitor (like cron). When a document is ready to run, DAS spawns a copy of the complete client BusinessObjects software. In other words, instead of just getting the data (like batch) the entire report is refreshed. It’s as if you hired a person to sit at a console and click on the Refresh button at scheduled intervals and then do a Send To User operation when the report finished. That’s it.

One side problem is this: under 3.1 Macro Objects could be processed by the Batch system. Since the Macro Object was evaluated by the client and just the SQL code sent to the batch processor, there were no problems. Using User Defined Objects under 4.x this is no longer possible. When the report is sent to DAS, unless the UDO file is already present on that server the report will fail.

The bottom line is this: to optimize your SQL, you will need to evaluate tricks that can be done by the universe Designer. Or, you could learn how to update the SQL using the scripting language and send the document out with a custom script. Good luck with either method that you choose!

Regards,
Dave Rathbun
Integra Solutions
www.islink.com See you in Orlando in… a few weeks!


Listserv Archives (BOB member since 2002-06-25)

Hi,

From: Haines, Timothy M APX[SMTP:HaineTM@HPD.ABBOTT.COM] Sent: 07 August 1998 17:06

Does anyone know a way to capture the SQL when a query is submitted to DAS, or force an optimize hint to the SQL, possibly for certian user id’s?

I have tried to pre-process the SQL through ReportScript to apply row-limit and IO restrictions to each query run by BOB. I was fairly successful in that before a refresh I could access and modify the DataProvider.SQL object, manipulating the string to include the restriction commands.

The problem with this is that when you build a query, and hit the ‘Run’ button that is apparently a different operation than 'Refresh’ing the document… and the modification does not happen.

According to BO Technical Support, this is to do with how the application is designed, and is never likely to change. I can’t see the sense in it somehow.

So, it IS possible but you need to be aware that not EVERY submission can be controlled.

Cheers,

Phil Morris
Analyst Programmer
BITS dept.
Tarmac Heavy Building Materials UK Ltd.
PO Box 8
Ettingshall
Wolverhampton
West Mids
WV4 6JP

Tel: 01902 382183
Email: pimorris@tarmac.demon.co.uk

“My own opinions are not necessarily those of my employer…”


Listserv Archives (BOB member since 2002-06-25)