[Asterisk-Users] Nested MySQL Commands

Chris Albertson chrisalbertson90278 at yahoo.com
Wed Jan 11 12:40:13 MST 2006




> ....Send a 
> query over to the MySql server with only the required 
> parameters and have it do all the processing for you and 
> only returns the results.

THe above describes the "whole point" of a SQL DBMS Server.
WHat else could you ask one to do for you?

Back to the original question:  "Can you use the result of
one query to feed another without going to the DBMS twice?
Yes, Of course SQL allows this.

In fact Data base experts
would be horrified to see any code that querries a value,
holds that value and then querries based on that value.
Doing this without holding a lock on the relevent tables is
just plain wrong and will result in bugs.  You should
_always_ write the SQL querry such that only one querry
gives you the results you need.  Manual Locks are not good, they
can be the source of very serious performance problems.

For more specific advice you would need to post the details
of what you are tring to do and a bit of the SQL you are
using.

> 
> I know that is a nice feature od Microsoft Sql. But have 
> not had a chance to read up on the performance of the new 
> version of MySql...

Basically MySQL is very fast when the load is light but scales
very poorly with either higher loads or higher conplexity
querries.  It is good for "flat file like" problems.  The
larger DBMSes are slower initially but scale better.

(Please CC any replies to my direct email)



Chris Albertson
  Home:   310-376-1029  chrisalbertson90278 at yahoo.com
  Cell:   310-990-7550
  Office: 310-336-5189  Christopher.J.Albertson at aero.org
  KG6OMK

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the asterisk-users mailing list