473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Linking Tables

Does linking tables with JOIN offer any significant performance
advantage or does it just make things more simple from a programming
standpoint?

Trevor

Jul 31 '06 #1
4 2576
If you mean JOIN give you a performance boost compared to doing
somethig lik "WHERE table_one_id = table_two_id" I'm not sure. You
could always run "EXPLAIN {sql statement here}" to see if you see a
difference.

JOINS are necessary when you want to include everything from one table,
even if it's not in the other (outer join).

HTH
D.

tr*********@gmail.com wrote:
Does linking tables with JOIN offer any significant performance
advantage or does it just make things more simple from a programming
standpoint?

Trevor
Jul 31 '06 #2
tr*********@gmail.com wrote:
Does linking tables with JOIN offer any significant performance
advantage or does it just make things more simple from a programming
standpoint?
SQL89-style joins (SELECT * FROM table1, table2 WHERE ...condition...)
and SQL92-style joins (SELECT * FROM table1 JOIN table2 ON
....condition...) should optimize identically in virtually all cases.

I prefer the SQL92-style joins, because it includes syntax to do outer
joins. There is no syntax to do outer joins in SQL89. It's nice to use
one syntax style throughout one's app.

Regards,
Bill K.
Jul 31 '06 #3
<tr*********@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
Does linking tables with JOIN offer any significant performance
advantage or does it just make things more simple from a programming
standpoint?
MySQL and other databases are *highly optimized* to do JOINs efficiently.

I would turn your question around a bit and say there are no performance
*disadvantages* to using JOINs with lots of great programming reasons to
take advantage of them.

The excuses people make to avoid learning table JOINs !

Of these, the lamest is an unwillingness to take a performance hit involved
with using JOIN. What performance hit? These amateurs take a performance
hit bigtime in lousy database design that always results from JOIN
avoidance.

JOINS are your friend ;-)
Thomas Bartkus
Jul 31 '06 #4
Thanks to all, I'll certainly take advantage of joins in my project.
They are certainly much better. I'm fairly new to MySQL, so I was using
nested while loops on three different queries and it was taking 16
seconds to perform about 900 queries on a page. Now by joining tables,
it loads in two.

Thanks again,
Trevor

Aug 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John South | last post by:
I have an Access 2000 front end that I wish to work with a SQL Server 2000 database by means of Linked tables. Do I have to use an ODBC connection to SQL Server? It seems to be the only option...
2
by: Jeff Pritchard | last post by:
Some time ago I am sure I came across something that said this was possible, though it doesn't seem to work. A client wants to replace an Access back-end with SQL Server tables. We have tried...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
18
by: Mark P | last post by:
I have a bit of vb code that uses Tables.Append to programatically link tables from Oracle and DB2 datasources. The problem I am having on some client machines is that the link will take anywhere...
2
by: Matthew Wells | last post by:
Good morning... I have an Access front end that uses SQL Server linked tables. SQL Server uses Windows authentication. I have one Windows group that all Access users are a member of. I added...
2
by: TheTamdino | last post by:
One of the things that is common between most genealogy databases is that they will have one screen were you log all the information for a given person and then (maybe) have a link to a source...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
1
by: hmiller | last post by:
I'm sorry to populate the server with yet another question about linking multiple tables and queries, howerver I have not been able to find the right criteria. My problem. I am trying to...
1
by: deiopajw | last post by:
I have a Back end database on a network drive. The copies of the front end are located on individual pc's (in their C drive). The problem arises when a laptop user naturally hooks up to the...
3
by: ARC | last post by:
I'm having trouble here with Access 2007 and connecting to a different database. The code below works great IF the previous back-end database connection is still present and you are trying to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.