Linked Questions

0 votes
0 answers
128 views

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 ...
Awer Muller's user avatar
185 votes
10 answers
134k views

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 ...
Chaowlert Chaisrichalermpol's user avatar
61 votes
5 answers
16k views

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 ...
utapyngo's user avatar
  • 7,204
25 votes
3 answers
69k views

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 ...
Rashidul Islam's user avatar
31 votes
2 answers
46k views

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 ...
Greg's user avatar
  • 3,532
3 votes
3 answers
19k views

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....
Run's user avatar
  • 57.7k
6 votes
2 answers
42k views

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 `...
Sankar's user avatar
  • 6,591
3 votes
2 answers
7k views

Is there any difference between left join and inner join regarding performance? I use SQL Server 2012.
mehdi lotfi's user avatar
  • 11.6k
11 votes
3 answers
9k views

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 ...
Brian's user avatar
  • 7,195
4 votes
3 answers
6k views

I have two tables Table X: millions or records |-----|-----|-----|-----| | a | b | c | d | |-----|-----|-----|-----| Table Y: only a few records |-----|-----| | e | f | |-----|-----| X....
benjamin.d's user avatar
  • 2,881
2 votes
1 answer
6k views

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 ...
TGH's user avatar
  • 39.4k
0 votes
1 answer
3k views

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 ...
Gabriel Santos's user avatar
3 votes
6 answers
695 views

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 ...
Przemyslaw Remin's user avatar
1 vote
2 answers
1k views

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 ...
Techy's user avatar
  • 2,654
1 vote
3 answers
1k views

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 ...
subodh's user avatar
  • 6,158

15 30 50 per page