两张表,第一张里两个字段,一个id ,一个路径,共有90W条记录
        第二张存了很多字段,其中一个字段存了路径,共有20万条记录
        其中第二张表中的路径记录肯定在第一张表中有,路径格式一样的。
        现在要查出第一张表在第二张表中无记录的路径。不知道我说清楚了没有。
麻烦大家了。
    
       
          

解决方案 »

  1.   

    贴记录及要求结果出来看看
    select * from b1 left join b2 on a.路径=b.路径 where b.路径 is null
      

  2.   

    说清楚了你的表上的索引情况如何? 主要是表二上这个[路径]是否创建了索引?
    如果想达到速度最快。则创建表一(路径)
    表二(路径) 这两个索引。然后select 表一.路径 from 表一left join 表二 using(路径) where 表二.路径 is null
      

  3.   

    我的sql语句:select picturelist.url LEFT join demand on picturelist.url=demand.supplyimage where demand.supplyimage is null表一 picturelist 路径字段url表二 demand 路径字段 supplyimage 
      

  4.   

    select picturelist.url from picturelist LEFT join demand on picturelist.url=demand.supplyimage where demand.supplyimage is null语法错误 
      

  5.   

    select picturelist.url from picturelist LEFT join demand on picturelist.url=demand.supplyimage where demand.supplyimage is null
      

  6.   

    汗谢谢哈 。。给分给分 一人50!~ 两位加我好友啥 。我正学习mysql呢。