sql - Which of these approaches has better performance for large tables? -
Give two tables to A and B in a database schema. A and B are related to many relationships, many B. are present for each A, and B has a foreign key column a_id. Both tables have a primary key column id.
Which of the following two queries do better for large data sets in A and B?
from SELECT A. * A, B. WHERE AID = BAID or
SELECT A From AID = BAIID on an inner BB or are they equal?
All of these are equivalent to 4 major database system: Oracle , SQL Server , MySQL , PostgreSQL .
Join syntax (to be more accurate, using JOIN instead of STREIGHT_JOIN ) Applying the command will help MySQL .
See this answer for details:
This is generally considered to be more clean and JOIN < / Code> Readable to use syntax.
However, I use the Oracle code sample which normally uses the WHERE syntax.
Comments
Post a Comment