inner join x subquery

Tuning de Banco, Tuning de SQL, Ferramentas de tuning
  

Poston Fri, 26 Sep 2014 2:20 pm

Good afternoon, Someone tell me what's more inner join performance or a query with subquery?
Note: I will bring only attributes (column) 1° table.
heraldoaraujo

Poston Mon, 29 Sep 2014 5:28 pm

As a general rule would be the own join, use specific indices for 2 tables.
But it depends on the situation of the Bank data of indexes, filters and fields, the amount of data in the two tables.
DanielNN
Location: Fortaleza - CE

att,

Daniel N.N.

Poston Fri, 06 Mar 2015 5:05 pm

@heraldoaraujo, In most situations the inner join is more performer, but it is important to be aware that there are some situations where it is better to perform a subquery. Currently you don't have to worry too much about that because if you write a subquery where an INNER JOIN would be better, the optimizer performs an operation called " Subquery Unnesting " ( http://docs.oracle.com/cd/B19306_01/ser ... htm#i55054 ) that transforms the subquery in inner join.

[] s
fbifabio
Location: São Paulo - SP

Fábio Prado
www.fabioprado.net

Poston Fri, 13 Mar 2015 10:26 am

Once again caution asks if use the word:d epende, because each specific scenario depends on the situation, particularly use inner join to be more performative in the majority of situations and in extreme cases of complex querys the path is the same subquery.
adrianoturbo
Location: Brasília

Adriano Alves
---Para cada problema dificil existe uma solução simples.----

Poston Tue, 26 May 2015 6:58 pm

Good evening, Just a hint regarding the subquery. Avoid the " in " and " not in " because these do not use index and give preference to " exists " or " not exists ".

I hope I helped.
Michel Pessoa



Return to DBA Tuning

Who is online

Users browsing this forum: No registered users and 2 guests