临时表建好存在什么地方.对数据库性能有什么影响.

解决方案 »

  1.   

    Temporary Tables
    You can also create temporary tables. Temporary tables are similar to permanent tables, except temporary tables are stored in tempdb and are deleted automatically when no longer in use.
      

  2.   

    临时表会在tempdb中创建表,可作为缓存中间数据
      

  3.   

    临时表--用于存放中间结果集。系统存在tempdb中,用完自动删除。手动删除也可。
    它会降低性能,一般少用,除非有更加糟糕的策略被使用,比如游标
    如果一个结果集复用性较高,那么临时表也是个不错的选择。