索引建了。 
daydayupliq(强强),联合查询不是太会用,能不能说得详细点?

解决方案 »

  1.   

    还有没有其他的sql语句可以提速的呢?
      

  2.   

    select * from A where not exists (select * from B where B.key1 = A.key1 )
    union all
    select * from B
      

  3.   

    联合 1.有重复  select * from A union select * from B;2.无重复     select * from A where not exists (select * from B where B.key1 = A.key1 )
           union all
           select * from B
    交集 
         select A.* from A ,B where B.key1 = A.key1 
      

  4.   

    union是将查询的两个结果集进行比较,去掉其中相同的部分,你用union all试试看速度如何.
    intersect查询两个交叉的结果,
    minus查询不在第一个集中除去第二个集中的全部数据,
    可以配合着使用.