现在的视图是:
select id, userid, description from table1
union
select id, userid, description from table2
union
select id, userid, description from table3
....
union
select id, userid, description from table16
这样的视图是不能建索引的。
所以怀疑起不到性能提升的作用,反倒跟单表操作没什么区别了。
select id, userid, description from table1
union
select id, userid, description from table2
union
select id, userid, description from table3
....
union
select id, userid, description from table16
这样的视图是不能建索引的。
所以怀疑起不到性能提升的作用,反倒跟单表操作没什么区别了。
select id, userid, description from table1
union all
select id, userid, description from table2
union all
select id, userid, description from table3
....
union all
select id, userid, description from table16
无法对视图 ... 创建 索引,因为其中包含一个或多个 UNION、INTERSECT 或 EXCEPT 运算符。如果将查询作为原始视图的 UNION、INTERSECT 或 EXCEPT 运算符的输入,请考虑为每个这样的查询创建一个单独的索引视图。"为每个这样的查询创建一个单独的索引视图"肯定是没有意义的。