rouble
rouble

Reputation: 18191

execution time of a stored procedure

What is the age old method of testing execution time of stored procedures on informix 11.5. I am thinking of doing something like this from a unix prompt:

$ time (echo 'execute procedure foo(1)' | dbaccess ...)

Any other ideas?

Upvotes: 2

Views: 1516

Answers (2)

Jonathan Leffler
Jonathan Leffler

Reputation: 753705

I use my SQLCMD program for this sort of job. It has a benchmark mode (-B option), and also makes it easier to write the SQL:

sqlcmd -d stores -B -e 'execute procedure foo(1)'

It is open source and available from the IIUG Software Archive.

Upvotes: 0

RET
RET

Reputation: 9188

Sure, you can do something more elaborate, but if that's all you need, why bother? Obviously if there are more steps, move the sql into a separate file and run

time dbaccess <dbname> file.sql

btw, there's a quote missing from your code fragment.

Upvotes: 1

Related Questions