动态网站制作指南 [  QQ表情  ]
[ 投票调查 ]
[ 企业邮箱 ]
[ 网站空间 ]
网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
ASP源码 | .Net源码 | PHP源码 | JSP源码 | JAVA源码 | CGI源码 | VB源码 | C++源码 | Delphi源码 | PB源码 | VF源码 | 汇编 | 服务器
电脑书籍下载:程序设计书籍 | 数据库教程书籍 | 平面与多媒体书籍 | 网络通讯书籍 | 系统管理书籍 | 网络安全书籍 | 认证考试书籍
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
文章搜索服务
邮件订阅
输入你的邮件地址,
你将不会错过任何关于:
[ Oracle教程 ]的信息



本月文章推荐
.存储参数(storage子句)含义及设.
.ORACLE客户端连服务器的注意事项.
.Oracle 数据表分区的策略.
.ORACLE用户连接的管理.
.转储设备使数据库备份更具可见性.
.Oracle Index 的三个问题(一).
.Oracle9i的物理内存管理.
.SQL 调优整理.
.Oracle Developer/2000使用技巧点.
.使用ERRORSTACK进行错误跟踪及诊.
.当EXP(带direct=y参数)导出一坏块.
.利用LOB字段存取操作系统二进制文.
.10gRAC系列之使用srvctl管理RAC数.
.Oracle9iAS——最完整的应用服务.
.Oracle 8i在P4上的安装.
.企业级OLAP 产品简介.
.oracle中的联合主键查询问题!.
.Oracle数据库游标使用大全(1).
.Oracle 10g跨越Resetlogs时间点进.
.在Adaptive Server Anywhere和Or.

关于临时表(from metalink)

发表日期:2008-2-9 |



  IntrodUCtion
  ~~~~~~~~~~~~
  This is an overview of TEMPORARY TABLES introduced in Oracle8i. This new feature allows temporary tables to be created automatically in a users temporary tablespace.
  
  Syntax
  ~~~~~~
   CREATE GLOBAL TEMPORARY TABLE tablename ( columns )
   [ ON COMMIT PRESERVE DELETE ROWS ]
  
   The default option is to delete rows on commit.
  
  What Happens
  ~~~~~~~~~~~~
   When you create a GLOBAL TEMPORARY table a dictionary definition of the table is created. As soon as the table gets populated (on the first
   INSERT or at creation time for CTAS operations) a temporary segment is created in the users default TEMPORARY tablespace location. This temporary
   segments contents are just like a normal table.
  
   Different sessions using the same GLOBAL TEMPORARY table get allocated
   different temporary segments. The temporary segments are cleaned up
   automatically at session end or transaction end depending on the specified
   duration (ON COMMIT PRESERVE ROWS or ON COMMIT DELETE ROWS).
  
   Apart from the data visibility temporary tables can be used like ordinary
   tables for most operations.
  
  
  Characteristics
  ~~~~~~~~~~~~~~~
  
  1. Data exists only for the duration of either the session or
   transaction.
  
   This can be specified in the create table command.
   For example:
  
   SQL> Create global temporary table emp_temp(eno number)
   on commit delete rows;
  
   - OR -
  
   SQL> Create global temporary table emp_temp(eno number)
   on commit preserve rows;
  
  
   ON COMMIT DELETE ROWS indicates a transaction level duration and PRESERVE indicates a session level duration.
  
  2. Data is visible only at session or transaction level. Multiple users using the same temporary table can see the definition of the table and their own data segment and nothing else.
  
  3. Indexes, triggers and views can be created on these tables.
  
  4. If an Index is created on temporary tables then it MUST be created
   when the table is empty - ie: When there are NO temporary segments for incarnations of the table. Indexes are implemented as separate temporary segments.
  
  5. No redo is generated for operations on the temporary table itself BUT undo is generated. Redo *IS* generated for the undo so temporary tables do indirectly generate redo.
  
  6. The keyWord GLOBAL indicates the table definition can be viewed by anybody with sufficient privileges - ie:using the same rules that apply to normal user tables. Currently only GLOBAL TEMPORARY tables are supported.
  
  7. TRUNCATE operations truncate only the current session's incarnation of the table.
  
  8. You can only eXPort or import the definition not the data.
  
  9. Segments get created only on the first insert (or CTAS) operation.
  
  
  Drawbacks
  ~~~~~~~~~
  
  1. The table definition is not dropped automatically.
  
  2. Only GLOBAL tables are supported right now,
not local ones.
  
  3. Can perform DDL only when no session is bound to it.
  
  4. There is no underlying support for STATISTICS on GLOBAL TEMPORARY tables so CBO (Cost Based Optimizer) has no statistical information to help determine an execution plan.
   NB: "ANALYZE TABLE COMPUTE/ESTIMATE STATISTICS" returns success even though no statistics are gathered.
  
  Constraints
  ~~~~~~~~~~~
  Constraints can be implemented on the table either at the session or
  transaction level depending on the scope of the temporary table and are not for the entire table even though the constraint is defined for the entire table.
  
  If there is a primary key or unique key constraint, it is applicable only at either session or transaction leve i.e. two users can enter the same values into the table from different sessions even though you have a primary / unique key in place for the entire table (if the scope is the session )
  
  In the case of a transaction level temporary table, the same values can be entered from different transactions.
上一篇:PHP连ORACLE的类文件 人气:494
下一篇:和权限有关的表介绍 人气:334
浏览全部Oracle教程的内容 Dreamweaver插件下载 常用网页广告代码全集
  最新网站源码 最新软件下载
2008-7-25 WikyBlog v1.7.0.1 多国语言版
2008-7-25 乐彼网上开店系统(56770 Eshop)
2008-7-25 赛特网站管理系统sitecms v3.6.0
2008-7-25 Modoer多功能点评系统 v1.0.1 Bu
2008-7-25 Shangducms Teamsuit! v1.1.0 开
2008-7-25 幻影动漫网视频系统(Ppdong) v1.
2008-7-25 acteecompany企业网站建设系统 v
2008-7-25 恒浪整合管理系统 ims v4.1 ACCE
2008-7-25 艺术图库系统 v1.0 beta
2008-7-19 UltraEdit 简体中文增强版 14.10
2008-7-19 CentOS 5.2 i386 LiveCD
2008-7-19 Snapture多功能相机 v1.4
2008-7-19 iAcces中文输入法 v1.0Build016
2008-7-19 Cookbook烹饪秘籍 v2.5
2008-7-19 苹果专用DVD转换工具 v1.1.59汉化
2008-7-19 Modem修复软件ZiPhone修改版04.0
2008-7-19 AgileMessenger即时通讯工具美化
2008-7-19 Sketches画图软件 v0.7b6破解版


  发表评论
姓 名: 验证码:
内 容:
[ 汉字翻译拼音 ] [ 广告代码 ] [ 符号对照表 ] [ 进制转换 ] [ 经典小工具 ] [ 个税计算 ] [ 汉字简繁转换 ] [ 普通单位换算 ] [ 公制单位换算 ]
[ 生辰老黄历 ] [ 国内电话区号 ] [ 国家代码与域名缩写 ] [ 文字加密解密 ] [ 健康查询 ] [ 万年历 ] [ 手机号码查询 ] [ ip搜索 ] [ Google PR查询 ]
业务联系 | 广告刊登 | 频道合作 | 投稿荐稿 | 联系方式 | 加入收藏 | RSS订阅
Copyright © 2000-2008 www.knowsky.com All rights reserved | 网络实名:动态网站制作指南 | 沪ICP备05001343号
ホームページ制作 不動産検索システム 求人情報
防水工事·改修工事 フットサル大会 探偵