I have two tables with identical structure:
table1_1
table1_2
and a view1:
select * from table1_1 union all select * from table1_2
select count(1) from table1_1
returns in under a second
select count(1) from table1_2
returns in under a second as well
But
select count(1) from view1
just gets stuck. How is this possible?