Oppolzer - Informatik / Blog


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

DB2-L - Diskussion über (unerwünschten?) Tablespace Scan

Subject:

Re: z/OS DB2 V10 NFM Why is the optimizer doing this?

From:

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

Reply-To:

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

Date:

2015.01.04 09:36:00


If CLIENT_NO in production has this 3 values only, too,
DB2 knows that from the statictics and will not use the index,
but use TS scan instead, no matter if you code the WHERE condition
for CLIENT_NO or not ... because the filter factor is 100 % and DB2 doesn't
get any profit from using the index ... TS scan is faster in this case.

So of course you get the same run time ... TS scan in both cases.

Kind regards

Bernd


Am 04.01.2015 um 04:26 schrieb T.W.:
>
> I tried running the original SQL in our dev and acceptance test systems with
> and without the CLIENT_NO in the WHERE.  I saw no difference in the run time.
> Doing a TS scan or using an index both woked.
>
> The tables get reorged on Sunday.  Monday I will have them try this again in
> production and watch it in Mainview.
>
>

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