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 1806
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
help me with this?
Thank you in advance.
...
|
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 until the
production server was upgraded to mysql...
|
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.
mysql> UPDATE leads SET inuse='0' WHERE inuse!='0' and...
|
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 back a results set that I dump in an ASP.NET...
|
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 C#.NET and Microsoft SQL Server 2000 Production and...
|
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 bought
another 500GB disk to add to the PC)...
|
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 Standard
Edition Server and run some queries (having...
|
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
difference between MSDE and SQL Express 2005 (I'll just...
|
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 for achieving the same result set. They are
...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |