Link to home
Start Free TrialLog in
Avatar of JSW21
JSW21Flag for United States of America

asked on

ASHX page/Web page pulling data from mysql... slow response from time to time.

Hello
I have a basic .ashx page with comma separate data display around 5-6000 rows.
User will queries with different parameter from the URL field.

My tool are
IIS, MySQL, subSonic, and some vb code behide to calculate data.

I am encounter unknown issue where i query the URL some time it is fast, some times take 1 -2 min. On the very same data.

I disable cache due to the type of data keep changing.

Where could be the first culprit or setting that needed to be done?
Avatar of jagssidurala
jagssidurala
Flag of India image

Can you post your sql query?
Avatar of JSW21

ASKER


using (var db = new DbManager(_dictionary_of_dbName[dbName]))
                {
                    db.SetCommand(
                        string.Format(
                            @"SELECT * FROM `{0}`
                        WHERE `OATradeDateTime` <= {1} ORDER BY `OATradeDateTime` DESC LIMIT {2}",
                            tableName, endDate, iLimit));
                    iData = db.ExecuteList<DataTable_d>();
                    iData.Reverse();
                    return iData;
                }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of jagssidurala
jagssidurala
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JSW21

ASKER

This are samples but they are the same in nature. just different table, db, etc.
They are also in the StorageProvider of subsonic.

Avatar of JSW21

ASKER

WITH NOLOCK

Interesting, I guess i have another cheap question, what happened

If i have another thread update MYSQL and another thread select data similar to above no the same table... will it be concurrent operation. Do i need to do something similar to select statement With Nolock?
We will get the committed records(saved into the DB) if we use no lock.means if any updates are happening at the time retrieval server will give you the records irrepective of updates i.e., with out any locking on the table.