dbTalk Databases Forums  

Using stored procedures

comp.databases.mysql comp.databases.mysql


Discuss Using stored procedures in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Yo
 
Posts: n/a

Default Using stored procedures - 10-26-2010 , 07:40 AM






Hello,

I am working on a C++ app using a MySQL database in version 5.0.

For the moment, the requests for the databse are coded in the C++ part
and sent to the database via ADO connection.

As I noticed that stored procedures are available in MySQL 5.0, I'd
like to know if using stored procedures in spite of requests sent from
C++ code could enhance the performances of our MySQL server ?

Thank you.

Reply With Quote
  #2  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Using stored procedures - 10-26-2010 , 07:49 AM






On 10/26/2010 8:40 AM, Yo wrote:
Quote:
Hello,

I am working on a C++ app using a MySQL database in version 5.0.

For the moment, the requests for the databse are coded in the C++ part
and sent to the database via ADO connection.

As I noticed that stored procedures are available in MySQL 5.0, I'd like
to know if using stored procedures in spite of requests sent from C++
code could enhance the performances of our MySQL server ?

Thank you.


Not significantly, if at all.

If you're having a performance problem, you should find the cause of
the problem(s) and fix it(them).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #3  
Old   
Yo
 
Posts: n/a

Default Re: Using stored procedures - 10-26-2010 , 07:57 AM



Jerry Stuckle avait soumis l'idée :
Quote:
On 10/26/2010 8:40 AM, Yo wrote:
Hello,

I am working on a C++ app using a MySQL database in version 5.0.

For the moment, the requests for the databse are coded in the C++ part
and sent to the database via ADO connection.

As I noticed that stored procedures are available in MySQL 5.0, I'd like
to know if using stored procedures in spite of requests sent from C++
code could enhance the performances of our MySQL server ?

Thank you.



Not significantly, if at all.

If you're having a performance problem, you should find the cause of the
problem(s) and fix it(them).
I am not having a performance problem, but I want to avoid such
problems as my database will have to face lots of connections. So if
using stored procedures could help to enhace performances, I'd prefer
to use them now that coding is still on progress rather than having to
re-code everything when program is terminated ... ;-)

Reply With Quote
  #4  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: Using stored procedures - 10-26-2010 , 08:25 AM



On Tue, 26 Oct 2010 14:40:25 +0200, Yo wrote:
Quote:
Hello,

I am working on a C++ app using a MySQL database in version 5.0.

For the moment, the requests for the databse are coded in the C++ part
and sent to the database via ADO connection.

As I noticed that stored procedures are available in MySQL 5.0, I'd
like to know if using stored procedures in spite of requests sent from
C++ code could enhance the performances of our MySQL server ?
Mostly not. It's still running the same SQL in the Stored Procedures as
it is doing plain SQL hits. If you're doing a lot of recursion within
your c++ application and establishing a lot of connections to support
that, then moving to SPs to handle the recursion for you may help a lot,
but that's not something that people do a lot of, in general.

--
38. If an enemy I have just killed has a younger sibling or offspring
anywhere, I will find them and have them killed immediately,
instead of waiting for them to grow up harboring feelings of
vengeance towards me in my old age. --Anspach's Evil Overlord list

Reply With Quote
  #5  
Old   
Yo
 
Posts: n/a

Default Re: Using stored procedures - 10-26-2010 , 08:29 AM



Peter H. Coffin a pensé très fort :

Quote:
Mostly not. It's still running the same SQL in the Stored Procedures as
it is doing plain SQL hits. If you're doing a lot of recursion within
your c++ application and establishing a lot of connections to support
that, then moving to SPs to handle the recursion for you may help a lot,
but that's not something that people do a lot of, in general.
No recursion is used. Thank you anyway for the answers.

Reply With Quote
  #6  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Using stored procedures - 10-26-2010 , 01:46 PM



On 10/26/2010 8:57 AM, Yo wrote:
Quote:
Jerry Stuckle avait soumis l'idée :
On 10/26/2010 8:40 AM, Yo wrote:
Hello,

I am working on a C++ app using a MySQL database in version 5.0.

For the moment, the requests for the databse are coded in the C++ part
and sent to the database via ADO connection.

As I noticed that stored procedures are available in MySQL 5.0, I'd like
to know if using stored procedures in spite of requests sent from C++
code could enhance the performances of our MySQL server ?

Thank you.



Not significantly, if at all.

If you're having a performance problem, you should find the cause of
the problem(s) and fix it(them).

I am not having a performance problem, but I want to avoid such problems
as my database will have to face lots of connections. So if using stored
procedures could help to enhace performances, I'd prefer to use them now
that coding is still on progress rather than having to re-code
everything when program is terminated ... ;-)


Don't prematurely optimize! If you later have a performance problem,
find the cause of that problem and fix it. More likely than not it will
be either require tuning the server and/or getting faster hardware (in
which case no coding is required), or redesigning your database - in
which case you'll have to recode anyway.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.