|
Posted by jsfromynr on 12/05/88 11:28
Hi Hugo,
As always you are being a gentleman and willing to provide
help. The above query can be converted into an inner join.
Something like this :--
Select * From EmpMst Where deptid in
( Select deptid from deptmst where deptname='acc')
-----------------
into This ----
--------------
Select * From EmpMst EM
Inner Join DeptMst DM On Dm.deptid = EM.deptid and DM.deptname='acc'
I have one problem while optimizing the sql query .For a few rows the
query works perfectly ,but as the number of rows increases it works but
gives wrong result.
I am using nested queries W/O aliasing . So what I assume is that Query
Optimizer is trying to flatten the query (converting it into joins)
and in the process ,because of no Alias Name takes a long time .
What might be the reasons for performance debacle? Following is what I
am using
1. Views (using *) ----------
2. Indexing (Clustered)
3. History Data (2 Billion Rows)
4. No Indexed views
5. Scalar Functions ( a bit For format Checking like All
alphabets,digits etc)
6. No Cursor
7. Updating a permanent temp table for intermediate results.
With Warm regards
Jatinder Singh
Navigation:
[Reply to this message]
|