New answers tagged

0 votes

Select tables data with sum of other tables

Think through it this way it will be executed: JOIN the user and history tables together. Imagine the resulting "table" that contains all combinations of rows -- based on ON, which ...
Rick James's user avatar
  • 74.7k
3 votes

SQL Server 2014 Cardinality Estimator estimate final number of rows after OUTER JOIN is less than number of rows from initial table

Cardinality Estimation is just an estimation. Many times it won't be the exact number of rows, for a multitude of reasons. But if it is, great, that means the SQL Engine was able to do its job ...
J.D.'s user avatar
  • 31.7k
1 vote

Join order and nullability

Based on some experimentation and my understanding of how join order works in Postgres, I think the following rules can be applied: Note: in the diagrams below, ! denotes not nullable, ∅ denotes ...
Daniel Rearden's user avatar
-1 votes

Join order and nullability

When working with the results of a database query inside a statically typed application, we need to know whether a particular column could return null or not. No, you do not. You need to know if the ...
White Owl's user avatar
  • 594
2 votes

ORA-12015 materialized view complex query error with simple join two table

5.2.2 About Materialized Views Containing Only Joins If you specify REFRESH FAST, Oracle Database performs further verification of the query definition to ensure that fast refresh can be performed if ...
Balazs Papp's user avatar
  • 39.5k
3 votes

Worst performance multiple left join big tables after restore DB

Duplicate indexes For starters, it certainly does not help that you duplicated most of your indexes. Your setup is struggling with insufficient cache as indicated by the large numbers of read's in the ...
Erwin Brandstetter's user avatar

Top 50 recent answers are included