slow select command
Posted: Fri 14 Sep 2007 16:14
I have a table with about 150K rows which I access via a query component.
The path column is a varchar(250) and indexed
If I put a break point on the execute statement in the code below I see that the function takes about 25 seconds to return
If I then open a MySQL commond prompt and run the following command, it returns in 0.02 seconds
SELECT * FROM TABLE1 ORDER BY PATH LIMIT 50;
I have fetchall = false
It seems to me that the problem is with the MyDAC component - Any ideas why this might be so and what i can do to get around it
The path column is a varchar(250) and indexed
If I put a break point on the execute statement in the code below I see that the function takes about 25 seconds to return
Code: Select all
MyQuery3->Close();
MyQuery3->SQL->Clear();
MyQuery3->SQL->Add("SELECT * FROM TABLE1 ORDER BY PATH);
MyQuery3->Execute();
SELECT * FROM TABLE1 ORDER BY PATH LIMIT 50;
I have fetchall = false
It seems to me that the problem is with the MyDAC component - Any ideas why this might be so and what i can do to get around it