Re: [PHP-DB] Performance of Stored Procedures ?

2001-05-14 Thread John Lim

Here's a guess on the speed difference.

It really depends on when the stored procedure is compiled.

When astored procedure is compiled, a query plan is created
based on the distribution of the data and the indices that were
available at that point in time.

So it is possible for a simple select statement to be faster than a
stored procedure if the stored procedure is using stale information.

The way you do your benchmarks can significantly affect the timings
also. Can you share your benchmarks with us?


Regards, John


Robert Boehrs <[EMAIL PROTECTED]> wrote in message
0AF1B047BDAAD4119C01000102B0367C05389E@UNITED01">news:0AF1B047BDAAD4119C01000102B0367C05389E@UNITED01...
> Hi,
>
> i've just made some simple test with oracle and stored procedures. I've
used
> a simple select-statement within the stored procedure and the same query
for
> a direct query within php.
> The direct query was about 50% faster. Is that normal? Will the stored
> procedures become faster with more complex queries?
>
> Any comments welcome
>
> Robert
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Performance of Stored Procedures ?

2001-05-14 Thread Lokesh Wuluvarana

Well tuned (using appropriate indexes and following a good execution
plan) Queries work faster than procedures. If the query involves
mathematical computation or operations such as substr, concatenations,
then a PL/SQL procedure works better. It all depends what the quey is
doing.

Lokesh

"Thies C. Arntzen" wrote:
> 
> On Mon, May 14, 2001 at 02:52:01PM +0200, Robert Boehrs wrote:
> > Hi,
> >
> > i've just made some simple test with oracle and stored procedures. I've used
> > a simple select-statement within the stored procedure and the same query for
> > a direct query within php.
> > The direct query was about 50% faster. Is that normal? Will the stored
> > procedures become faster with more complex queries?
> 
> this pretty much depends on the code you write.
> 
> could you send me the code you used for your "little"
> benchmark - so i could have a loot at it?
> 
> tc
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Performance of Stored Procedures ?

2001-05-14 Thread Thies C. Arntzen

On Mon, May 14, 2001 at 02:52:01PM +0200, Robert Boehrs wrote:
> Hi,
> 
> i've just made some simple test with oracle and stored procedures. I've used
> a simple select-statement within the stored procedure and the same query for
> a direct query within php.
> The direct query was about 50% faster. Is that normal? Will the stored
> procedures become faster with more complex queries?

this pretty much depends on the code you write.

could you send me the code you used for your "little"
benchmark - so i could have a loot at it?

tc

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]