MySQL Forums
Forum List  »  Performance

Re: 30,000 MySQL queries...
Posted by: MySQL Hero
Date: September 16, 2005 03:23PM

Each query is run through a single SQL statement handle. Each query is unique. I'm running this localhost on a development PC with all the usual amenities - IDE, debugger, etc. Each SQL statement is prepared and then executed using SQLPrepare and the SQLExecute calls respectively.

Sample SQL queries below (field names changed to protect the target application):

Query = "SELECT *\r\n";
Query += "FROM Fi, FiType\r\n";
Query += "WHERE Fi.FiType_ID = FiType.FiType_ID\r\n";
Query += " AND Fi_Sig_X = '" + SQLSig + "'";
...Executes the query...if no result...executes a different select query...if no results...<repeats a few times>

If it fails to find the information...
Query = "INSERT INTO Fi (FiType_ID, Fi_NM,\r\n";
Query += " Fi_Sig_X, Fi_Co_X,\r\n";
Query += " Fi_V_X, Fi_FiSize_X,\r\n";
Query += " Co_ID, Fi_Desc_X,\r\n";
Query += " Fi_Count_NB, Fi_TL_NB, Fi_DU_F,\r\n";
Query += " Fi_DD_X, Fi_DR_F)\r\n";
Query += "VALUES (" + DBQuery3.GetColumn("FiType_ID") + ", '" + SQLFi + "',\r\n";
Query += " '" + SQLSig + "', '" + SQLCo + "',\r\n";
Query += " '" + SQLV + "', '" + SQLFiSize + "',\r\n";
Query += " " + DBQuery2.GetColumn("Co_ID") + ", '" + SQLDesc + "',\r\n";
Query += " 0, " + CString(y) + ", 0, ' ', 0)";
Executes.

See...nothing fancy. Just some select, insert, and update queries.

Options: ReplyQuote


Subject
Views
Written By
Posted
2255
September 16, 2005 07:24AM
1413
September 16, 2005 08:37AM
Re: 30,000 MySQL queries...
1475
September 16, 2005 03:23PM
1367
September 17, 2005 06:49PM
1495
September 25, 2005 03:16PM
1433
September 29, 2005 02:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.