Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

DB2-L - Performance-Unterschiede zwischen OUTER JOIN und NOT EXISTS

Subject:

The difference between LEFT JOIN and NOT EXISTS in performance

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

DB2 List <db2-l@lists.idug.org>

Date:

2012.10.22 11:08:00


I always recommend not to count too much on the COST_FACTORs
in the PLAN_TABLEs. Another issue is COST_CATEGORY = 'B', which
means that you have uncertainties due to HOST VARIABLES or
TABLE CARDINALITY. If you want to make sure what solution is better,
you have to use some kind of performance monitor.

But: between simple LEFT JOINs and NOT EXISTS, the differences
should be minimal, in my opinion.

Regarding your other post: I didn't quite understand what the solution was;
was it, that the GET DIAGNOSTICS / ROW COUNT has not been executed
due to the position in the IF statement? Thank you for making this clear.

Kind regards

Bernd



Am 22.10.2012 08:17, schrieb M.N.:
> The difference between LEFT JOIN and NOT EXISTS in performance in
> visual expla in showed LEFT JOIN is better than NOT EXISTS but in run
> time (when i run the stored procedure ) NOT EXISTS is better than LEFT
> JOIN how can i checked it carefully ???
> -----End Original Message-----

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie