April 21, 2005 at 6:28 am
I checked the execution plans for each query, the first one by Carl has a cost of 49.92% vs 50.08% for Hariharan. But without the real indexed data it's hard to say which is really the fastest.
April 21, 2005 at 7:59 am
Michael,
The Expression:
Select ... From Table1,Table2
without a where clause is a cross join!
Therefore it should be exactly the same as the one posted by Carl with less typing
* Noel
April 21, 2005 at 8:04 am
I totally agree with you but the execution plan still shows a smallish difference between the 2 plans... but then again this is unrealistic data so I would read a lot into it.
April 21, 2005 at 8:27 am
Remi,
You are correct in that the plan may be a little different but then again all those are very specific for data amount, skew in it and index presence.
As of instructions for sql server they are equivalent 100% is like the equivalency of the ANSI join syntax with the old where style
* Noel
April 21, 2005 at 9:57 am
Noeld, Remi thanks for your response. Now just one more question (I caught this just one more question habit from my kids. ) is there a way to get the desired results without producing a Cartesian product?
Thanks
Mike
April 21, 2005 at 10:10 am
You want a cartesian result that is not cartesian????????
April 21, 2005 at 10:30 am
Remi thanks. Just fuzzy thinking here in re-reading the original post I see that cartesian result is required. I must have a thing about requesting data that is not needed or creating a cartesian result when it is not needed. Speed and more Speed is always a concern. And it appears that I could use a does of NoDose to speed up the thinking process.
Mike
April 21, 2005 at 8:19 pm
Hi guys,
sorry for the late response. many of you have expressed concern on the cartesian join (CROS JOIN).. my only intension was to achive the desired result. CROSS JOIN is always a overhead to the server, coz it will give a drastic impact on the peformance if the volume of data is high.
-Hari
Viewing 8 posts - 16 through 22 (of 22 total)
You must be logged in to reply to this topic. Login to reply