Last post Nov 22, 2014 10:31 AM by PatriceSc
Nov 22, 2014 09:08 AM|ayyappan.CNN|LINK
Dear SQL Experts,
Pls advice on this...
When I (in ASPx) generate results from more than 20 MS-SQL tables in a database (very oldest tables /database there is no inex methods), maximum time show server time-out message, then I tried “scmd.CommandTimeout = 1500” but no results, then I tried using “select query to into temptable” its works but taking too much of time. After this process I take results from another one select qry from TempTable.
Now I started using like “Select Field1,field2….. INTO TempTable from MasterTxn” instead of this shall I try “Cursor” method, please share your views/ideas on this!
Nov 22, 2014 10:25 AM|oned_gk|LINK
Nov 22, 2014 10:31 AM|PatriceSc|LINK
"No index methods" do you mean the db doesn't have any index. The point would be to see what is the query plan to sport what is slow and fix that. Adding indexes if they are missing is certainly part of the fix. Make sure to have indexes on columns used
in your JOIN statement.
Also it's a bit suprising that you need so muich joins to show something. Try
There is no magic bullet. You must understand what is slow before fixing it.
BTW a common error is also to show a huge amount of rows. I this case this is not always the query but rendering a huge HTML page that takes instead most of the time.