Linked Questions
40 questions linked to/from INNER JOIN vs LEFT JOIN performance in SQL Server
0
votes
0
answers
128
views
Is there any performance difference between using inner join vs left join? [duplicate]
I was just writing a query when I thought of this. My query will yield exactly the same result using either inner join or left join, since I'm joining tables on a foreign key relationship, selecting ...
185
votes
10
answers
134k
views
Does Foreign Key improve query performance?
Suppose I have 2 tables, Products and ProductCategories. Both tables have relationship on CategoryId. And this is the query.
SELECT p.ProductId, p.Name, c.CategoryId, c.Name AS Category
FROM Products ...
61
votes
5
answers
16k
views
Should I avoid multi-table (concrete) inheritance in Django by any means?
Many experienced developers recommend against using Django multi-table inheritance because of its poor performance:
Django gotcha: concrete inheritance by Jacob Kaplan-Moss, a core contributor of ...
25
votes
3
answers
69k
views
Query Performance INNER JOIN ON AND comparison
I would like to know which one is best regarding performance between the 2 queries stated below or do they perform identically?
First one: [without WHERE clause, just AND with ON]
SELECT ...
31
votes
2
answers
46k
views
LEFT JOIN Significantly faster than INNER JOIN
I have a table (MainTable) with a bit over 600,000 records. It joins onto itself via a 2nd table (JoinTable) in a parent/child type relationship:
SELECT Child.ID, Parent.ID
FROM MainTable
AS ...
3
votes
3
answers
19k
views
inner join vs left join - which is faster for the same result?
If both inner join and left join can achieve the same result, which one is faster and has better performance (especially on large data)?
inner join:
SELECT *
FROM Table_A A
INNER JOIN Table_B B
ON A....
6
votes
2
answers
42k
views
postgresql JOIN with multiple conditions
I have two postgres tables:
worker_details_verification (verification_id BIGSERIAL, worker_id BIGINT,
state TEXT, proofs TEXT[])
worker_details(worker_id BIGINT, name TEXT)
Now I want to get
`...
3
votes
2
answers
7k
views
Performance difference between left join and inner join
Is there any difference between left join and inner join regarding performance? I use SQL Server 2012.
11
votes
3
answers
9k
views
MySQL Inner Join VS Left Join w/ IS NOT NULL?
Is there a performance difference in the following?
SELECT person.id
FROM person
LEFT JOIN address ON person.id = address.personID
WHERE address.personID IS NOT NULL
vs
SELECT person.id
FROM person
...
4
votes
3
answers
6k
views
Mysql - LEFT JOIN way faster than INNER JOIN
I have two tables
Table X: millions or records
|-----|-----|-----|-----|
| a | b | c | d |
|-----|-----|-----|-----|
Table Y: only a few records
|-----|-----|
| e | f |
|-----|-----|
X....
2
votes
1
answer
6k
views
Outer JOIN vs Inner JOIN
I have always thought that Inner Join performs better than Outer JOIN, but I've experienced several cases now where this simply isn't true...
The other day I was creating a query with a series of ...
0
votes
1
answer
3k
views
Difference of "FROM a LEFT JOIN b" vs. "FROM a, b"
Do the queries do the same? What is the standard?
Will I lose performance if I change one of these ways of write the query?
Query 1
SELECT a.*, b.id AS b_id
FROM table_a AS a
LEFT JOIN ...
3
votes
6
answers
695
views
Improving performance of adding a column with a single value
By experimentation and surprisingly, I have found out that LEFT JOINING a point-table is much faster on large tables then a simple assigning of a single value to a column. By a point-table I mean a ...
1
vote
2
answers
1k
views
Issue in query with inner join and concat() operation in mysql
I have two tables:
sk_accounts //details of user
acnt_user_id
acnt_fname //first name
acnt_lname
acnt_profile_picture
acnt_member_class
so on........
sk_following //table containing ...
1
vote
3
answers
1k
views
Fetching records from the MySQL database from 10 tables
I have a database with 20 tables inside it. I want to fetch records from 10 related tables at a time, and I am using Hibernate. What is the best solution: to write a single query using join with ...