六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 66|回复: 0

db2使索引生效和导入数据

[复制链接]

升级  12%

18

主题

18

主题

18

主题

秀才

Rank: 2

积分
68
 楼主| 发表于 2013-1-13 18:28:45 | 显示全部楼层 |阅读模式
db2对其一个表的runstats:
db2 "runstats on table ibasdb.um_organ and index all"
 
db2对所有表的索引的runstats:
db2 -x "select  tabname form syscat.tables where tabschema='ibasdb' and type='t'" | while read i ;do db2 "runstats on table ibasdb.$i and index all " ;done
 
db2对一个表的导入在linux的环境下:
db2 "load client from /path/data.del of del insert into schema.table"
 
查找到所有的表
 
select   *   from   SYSSTAT.tables   where   tabschema   = 'IBASDB'    
创建schema:
create schema schema_name 
查看数据库zhdbs详细信息:
 
get db cfg for zhdbs 
 
 
为了防止数据库乱码创建数据sql:
 
db2 create database zhdbs using codeset GBK territory CN  
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表