Stored Procedures vs mysqli_multi_query

Stored Procedures vs mysqli_multi_query

am 20.10.2006 14:41:24 von Iulian Manea

------=_NextPart_000_009C_01C6F45E.33B32740
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hey everybody,



Here is my problem: i have to exectute multiple SELECT queries to the

database, ad my question is how it would be how it would be faster:

1) either calling a stored procedure with mysqli_multi_query. That

stored procedure wold contain all of the SELECT queries.

2) using mysqli_multi_query to query all of the SELECTs directly



I don't know exactly how mysqli_multi_query works, i mena does it send

all of the queryes in one message to the mysql server, or one by one

(like a regulat mysql(i)_query)? Because if you call a stored procedure

it sends just ONE query (the CALL of the procedure).



I hope you understood what i ment ...



Thanks in advance!




------=_NextPart_000_009C_01C6F45E.33B32740--

Re: Stored Procedures vs mysqli_multi_query

am 23.10.2006 02:41:21 von Chris

Iulian Manea wrote:
> Hey everybody,
>
>
>
> Here is my problem: i have to exectute multiple SELECT queries to the
>
> database, ad my question is how it would be how it would be faster:

How are you going to check for errors or whether the queries worked?

If you run multiple queries in the same function call, how do you know
which one failed?

Answering your question, I have no idea - you'd probably be best setting
up some tests.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php