Quantcast
Viewing all articles
Browse latest Browse all 3587

Outer Join statistics show high page IOs

We have a very wide table (will call it A)

 

which I'm looking at splitting into 3 tables each with the same PK and each partitioned in the same way

called AVP1, AVP2, AVP3

 

I then create a view over the 3 tables joining them with an outer join

 

create view ANEW

as

    select ...

    from      AVP1, AVP2, AVP3

    where   AVP1.Col1 *= AVP2.Col1

    and       AVP1.Col2 *= AVP2.Col2

    and       AVP1.Col1 *= AVP3.Col1

    and       AVP1.Col2 *= AVP3.Col2


with some data in AVP1 and AVP2 but AVP3 is empty.

 

Selecting 987 rows out of the view

     select <only cols from AVP1>  from ANEW where Col1 = "ABCDEF"

 

I get odd statistics....

 

Table: AVP1 (VP1) scan count 1, logical reads: (regular=64 apf=0 total=64), physical reads: (regular=0 apf=0 total=0), apf IOs used=0

Table: AVP2 (VP2) scan count 987, logical reads: (regular=36 apf=0 total=36), physical reads: (regular=0 apf=0 total=0), apf IOs used=0

Table: AVP3 (VP3) scan count 987, logical reads: (regular=1974 apf=0 total=1974), physical reads: (regular=0 apf=0 total=0), apf IOs used=0

 

I get large amounts of IO on an empty table whereas the table which actually has some data only shows 36 page reads.

 

All tables are partitioned using the same criteria - yet I'm getting 2 pages per row read from an empty table.

 

Can't make out why ?


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>