Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1184531
  • 博文数量: 398
  • 博客积分: 10110
  • 博客等级: 上将
  • 技术积分: 4055
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-23 20:01
个人简介

新博客http://www.cnblogs.com/zhjh256 欢迎访问

文章分类

全部博文(398)

文章存档

2012年(1)

2011年(41)

2010年(16)

2009年(98)

2008年(142)

2007年(100)

我的朋友

分类: 数据库开发技术

2008-08-13 11:13:04

teradata sql解释计划果然够恶心,都不知道从哪开始研究。
EXPLAIN SELECT * FROM DBC.TABLESIZE
 
Explanation
   1) First, we lock DBC.DataBaseSpace for access, we lock DBC.TVM for
      access, and we lock DBC.Dbase for access.
   2) Next, we flush the DISKSPACE and AMPUSAGE caches.
   3) We do an all-AMPs RETRIEVE step from DBC.Dbase by way of an
      all-rows scan with no residual conditions into Spool 2 (all_amps),
      which is duplicated on all AMPs.  The size of Spool 2 is estimated
      with low confidence to be 20,164 rows.  The estimated time for
      this step is 0.08 seconds.
   4) We do an all-AMPs JOIN step from Spool 2 (Last Use) by way of an
      all-rows scan, which is joined to DBC.TVM by way of an all-rows
      scan with no residual conditions.  Spool 2 and DBC.TVM are joined
      using a single partition hash_ join, with a join condition of (
      "DBC.TVM.DatabaseId = DatabaseId").  The result goes into Spool 3
      (all_amps), which is redistributed by hash code to all AMPs.  The
      size of Spool 3 is estimated with index join confidence to be
      35,926 rows.  The estimated time for this step is 0.14 seconds.
   5) We do an all-AMPs RETRIEVE step from DBC.DataBaseSpace by way of
      an all-rows scan with a condition of ("DBC.DataBaseSpace.TableId
      <> '000000000000'XB") into Spool 4 (all_amps), which is
      redistributed by hash code to all AMPs.  The size of Spool 4 is
      estimated with no confidence to be 3,462,486 rows.  The estimated
      time for this step is 0.72 seconds.
   6) We do an all-AMPs JOIN step from Spool 3 (Last Use) by way of an
      all-rows scan, which is joined to Spool 4 (Last Use) by way of an
      all-rows scan.  Spool 3 and Spool 4 are joined using a single
      partition hash join, with a join condition of ("(DatabaseId =
      DatabaseId) AND ((DatabaseId = DatabaseId) AND (TableId = TVMId ))").
      The result goes into Spool 1 (group_amps), which is built locally
      on the AMPs.  The size of Spool 1 is estimated with no confidence
      to be 3,462,486 rows.  The estimated time for this step is 0.63
      seconds.
   7) Finally, we send out an END TRANSACTION step to all AMPs involved
      in processing the request.
   -> The contents of Spool 1 are sent back to the user as the result of
      statement 1.
阅读(2050) | 评论(0) | 转发(0) |
0

上一篇:ora-6522

下一篇:teradata的索引创建

给主人留下些什么吧!~~