on 2018 Feb 15 8:36 AM
Help me optimize the below sql,running for many many hours Database : sybase
select too.toID,too.toName,frm.fromID,frm.fromName<br> from entityClientTempTable frm, entityClientTempTable too where frm.fromServerId = too.toServerId and frm.fromID < too.toID and lower(substring(frm.fromName, 0, CHARINDEX(''------'',frm.fromName))) like lower(too.toName))
Number of records in entityClientTempTable : half a million approx
There are no indexes on entityClientTempTable table
entityClientTempTable is a temporary table.
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.