Hi All,
I know its very basic question and event I know the answer for this. But I haven't found any proof of this. Is there any difference between thse queries (given below at end of post)? (In terms of performance) - I'm using SQL 2000 and 2005 both.
- When I check with "Esimated Execution Plan", there is no difference (50% each), but there is very little data in my tables.
- I feel, Query 1 is preferred style of T-SQL developers and Query 2 is preferred Style of PL/SQL developers.
- Query 2 runs much faster is Oracle 9i (I had worked earlier)
Query 1: -
Select Cust.CustomerID, Cust.CustomerCode, Cust.FullCustName,
-
Cycl.CycleID, Cycl.CycleCode,
-
Jobs.JobID, Jobs.JobNo, Files.FileID, Files.[FileName],
-
Files.FileSize, Files.Status
-
From CustomerCode Cust INNER JOIN Setup Setu ON Cust.CustomerID = Setu.CustomerID
-
INNER JOIN FSECycles Cycl ON Setu.SetupID = Cycl.SetupID
-
INNER JOIN FSEJobs Jobs ON Cycl.CycleID = Jobs.CycleID
-
INNER JOIN FSEFiles Files ON Jobs.JobID = Files.JobID
-
Query 2: -
Select Cust.CustomerID, Cust.CustomerCode, Cust.FullCustName,
-
Cycl.CycleID, Cycl.CycleCode,
-
Jobs.JobID, Jobs.JobNo, Files.FileID, Files.[FileName],
-
Files.FileSize, Files.Status
-
From CustomerCode Cust, Setup Setu, FSECycles Cycl,
-
FSEJobs Jobs, FSEFiles Files
-
Where Cust.CustomerID = Setu.CustomerID
-
And Setu.SetupID = Cycl.SetupID
-
And Cycl.CycleID = Jobs.CycleID
-
And Jobs.JobID = Files.JobID
-
3 1742
In the first query you are using INNER JOIN syntax explicitely. this is as per ANSI specifications . Performance wise this is faster than the second one.
Thanks mate.
Is there any more detailed description available on net?
Thanks in advance.
Thanks mate.
Is there any more detailed description available on net?
Yes of course .
But only you need to search for that.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: yensao |
last post by:
Hi,
I have a hard time to understand difference and similarities between
Relational database model and the Object-Oriented model. Can somebody...
|
by: Doug Reese |
last post by:
hello,
i have what seems to me a very common operation i'm performing. i need to
find the balance on an invoice. i was not having any problems...
|
by: Shane Niebergall |
last post by:
Can someone explain why there is such a big performance difference in these
two queries? Note: I have a multicolumn index on ltid and inuse.
...
|
by: mas |
last post by:
I have a Stored Procedure (SP) that creates the data required for a
report that I show on a web page. The SP does all the work and just
returns...
|
by: mooreit |
last post by:
The purpose for my questions is accessing these technologies from
applications. I develop both applications and databases. Working with
Microsoft...
|
by: developmental2 |
last post by:
Hi all..!
If I want to split an SQL DB into several physical files (as its 500GB
disk ran out of space, won't even run shrinks any more, and we...
|
by: Nishant Saini |
last post by:
Dear All,
We have a database which contains many tables which have millions of
records. When We attach the database with MS SQL Server 2005...
|
by: HC |
last post by:
Hello, all, I started out thinking my problems were elsewhere but as I
have worked through this I have isolated my problem, currently, as a...
|
by: getmeidea |
last post by:
I have two tables
1. AccountMaster(AccountID int, Name varchar(20))
2. Transactions(TransID, AccountID int, Amount float)
I have two queries...
|
by: concettolabs |
last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: CD Tom |
last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
| |