(转)Recreate optimizer access plans using db2look

http://www.ibm.com/developerworks/data/library/techarticle/dm-0508kapoor/

 

Recreate optimizer access plans using db2look

A tool to aid in tuning queries

Samir Kapoor, DB2 UDB Advanced Support Analyst, IBM
Kaarel Truuvert, DB2 UDB Query Optimization Developer, IBM

 

Summary:  The db2look tool gives you a way to recreate the same access plan for your test environment that DB2® Universal Database™ (DB2 UDB) is using for your production environment. Here are all the details for setting it up.

Tags for this article:  copy, create, db2look, optimizer-1, statistics, udb

 

 

Date:  04 Aug 2005 
Level:  Advanced 

Activity:  5639 views 
Comments:   0 (View | Add comment - Sign in)

Average rating 5 stars based on 17 votes Average rating (17 votes)
Rate this article

 

Introduction

Working as a DB2 UDB Support Analyst, I frequently hear the following question from customers who are dealing with an optimizer or query planning problem:

"How do I recreate the same query access plan on my test environment that I am getting on my production environment?"

Many times, there is a need to replicate a production environment to a test environment, including recreating the same access plan for query analysis purposes.

For example, in production, you could experience performance problems caused by a query that is using a poor access plan and want to replicate the access plan on a test system in order try some different strategies, such as manipulating the statistics, changing the optimization level, trying different settings for DB2 registry variables, and so on, in order to improve performance.

In an ideal world, you would want to have the test environment as closely matched to production as possible. That is, you would want to use exactly the same hardware, operating system maintenance level and configuration, DB2 level, and configuration in both environments, as well as using the same data in test as in production. However, this ideal cannot always be achieved. If the production environment has a very large amount of data, you may simply not have the capacity to keep a test copy of the production system.

The db2look utility can be used to achieve your goal, even though you can't replicate all the details of production.

This article will explain how you can mimic a production system on a test system without the need for actual data in order to recreate a query planning problem. This ability will help you to debug queries and understand access plan issues without interrupting work in the production environment. Note, however, that if you want to test the execution of the resulting access plan, you will still need to load data from production onto test (as much data as possible). And there is always the possibility that the differences between the test and production systems are still enough that the execution characteristics on test do not match those on production. This part of analysis (performance tuning) is as much an art as science.

Other problems in the optimizer or query compiler area, such as SQL0901N errors or instance crashes, can also be recreated using the methods explained in this article. You can try various strategies, such as testing the most recent fix pack (if the system is at an older fix level), different optimization levels, different registry variables, and so on, in order to see if these changes will correct the problem.

Let's look at the options to use with db2look in order to achieve this goal.

The db2look command and its options

Here are the commands you use to capture the needed information from your production system:


Listing 1. Commands to recreate an optimizer problem
db2look -d <dbname> -l -o storage.out                        
db2look -d <dbname> -f -fd -o config.out
db2look -d <dbname> -e -a -m -o db2look.out 
db2look -d <dbname> -e -a -m -t table1 table2 .... tableX -o table.ddl

Now let's look at these db2look command options in more detail.

Generate buffer pool, tablespace, and database partition group information

db2look -d <dbname> -l -o storage.out

Here is a description of the options used in the db2look command above:

  • -d: Database name -- This must be specified.
  • -l: Generates database layout. This is the layout for database partition groups, buffer pools and tablespaces.
  • -o: Redirects the output to the given file name. If the -o option is not specified, then output goes to standard output (stdout), generally the screen.

The -l option is important to mimicking your production environment. Ideally, you want to have the same buffer pools, database partition groups (if you're in a multi-partition environment), and tablespace information (including temporary tablespaces). However, if you are constrained by memory and cannot allocate the large buffer pools that you have in production, then use thedb2fopt command. I'll discuss this command in more detail later in this section.

It is not always possible to have the same tablespaces set up in test that you have in production. For example, you may have devices set up with large sizes, and you may not have the flexibility to create the same device sizes in test. Or, you may not have a separate tablespace device available at all in the test environment. In addition, you might not have the same paths set up in test that you have in production. You would need to alter the paths, devices, and files appropriately to fit your test environment.

The important information used by the optimizer for a tablespace is the following. This is what you would want to make sure are the same on both test and production. (Note: The numbers shown here are an example. You should use the same settings on test as you do on production.)

PREFETCHSIZE 16
EXTENTSIZE 16
OVERHEAD 12.670000
TRANSFERRATE 0.180000

If a tablespace is "managed by database" on production, it should also be "managed by database" on test. If it is "managed by system" on production, it should also be that way on test.

Note: If this is a system with multiple physical partitions (MPP), the number of partitions in the database partition group must be the same on test. However, the number of physical machines does not have to be the same. The number of logical partitions in the whole MPP environment must be the same on both test and production.

Generate configuration parameters and registry variables

db2look -d <dbname> -f -fd -o config.out

Here, I've used the following parameters:

  • -f: Extracts configuration parameters and registry variables. If this option is specified, -wrapper and -server options will be ignored.
  • -fd: Generates db2fopt statements for opt_buffpage and opt_sortheap, along with other configuration and registry settings.

The output of the command looks like this:


Listing 2. Sample output from db2look command
$ db2look -d sample -f -fd

-- No userid was specified, db2look tries to use Environment variable USER
-- USER is: SKAPOOR
-- This CLP file was created using DB2LOOK Version 8.2
-- Timestamp: Sat Mar 26 00:13:36 EST 2005
-- Database Name: SAMPLE
-- Database Manager Version: DB2/6000 Version 8.2.2
-- Database Codepage: 819
-- Database Collating Sequence is: UNIQUE

CONNECT TO SAMPLE; 

-------------------------------------------------------- 
-- Database and Database Manager configuration parameters 
-------------------------------------------------------- 

UPDATE DBM CFG USING cpuspeed 6.523521e-07; 
UPDATE DBM CFG USING intra_parallel NO; 
UPDATE DBM CFG USING federated NO; 
UPDATE DBM CFG USING fed_noauth NO; 

!db2fopt SAMPLE update opt_buffpage 50000; 
!db2fopt SAMPLE update opt_sortheap 10000; 
UPDATE DB CFG FOR SAMPLE USING locklist 1000; 
UPDATE DB CFG FOR SAMPLE USING dft_degree 1;
UPDATE DB CFG FOR SAMPLE USING maxlocks 10; 
UPDATE DB CFG FOR SAMPLE USING avg_appls 1; 
UPDATE DB CFG FOR SAMPLE USING stmtheap 2048; 
UPDATE DB CFG FOR SAMPLE USING dft_queryopt 5; 

--------------------------------- 
-- Environment Variables settings 
--------------------------------- 

!db2set DB2_ANTIJOIN=yes; 
!db2set DB2_INLIST_TO_NLJN=yes; 

COMMIT WORK;
CONNECT RESET; 
TERMINATE; 

The -f and -fd options are key options to use in order to extract configuration parameter and environment variables, which the optimizer uses during access plan phase. In Listing 2, above, note the following output that resulted from the -fd option:

!db2fopt SAMPLE update opt_buffpage 50000; 
!db2fopt SAMPLE update opt_sortheap 10000; 

The db2fopt command tells the optimizer to use the specified value for "Buffer pool size," rather than adding up the pages of the buffer pools available. (Buffer pool size in the db2exfmt output is discussed further in the buffer pool size section below.). For example, say that you cannot afford to have large buffer pools due to memory constraints on the test system and would like to configure the size the same without actually having them in reality. Use the -fd option, which would generate the db2foptcommands required to tell the optimizer to use the specified size rather than calculating based on the buffer pools available for this database.

It works the same way for sort heap, as we'll see in the sort heap section below.

Here is the usage for the db2fopt command. Note, that the -fd option with db2look picks the values for you but you should be aware of the usage and as well aware of how to reset the values so that we go back to using syscat.bufferpools for bufferpool pages and sortheap in the database configuration.

C:\>db2fopt
Usage: db2fopt <database-alias> update [opt_buffpage <value>] [opt_sortheap <value>f]
   or  db2fopt <database-alias> get    [opt_buffpage] [opt_sortheap]]

If you would like to set the values for opt_buffpage and opt_sortheap, issue:

db2fopt <dbname> update opt_buffpage <value> opt_sortheap <value>

For example:

C:\>db2fopt sample update opt_buffpage 50000 opt_sortheap 10000

Update succeeded

Make sure to terminate and reconnect to the database.

If you would like to view the values, issue:
C:\>db2fopt sample get opt_buffpage opt_sortheap opt_buffpage value is 50000 opt_sortheap value is 10000

And if you would like to reset the values so that we do not use these two parameters, and go back to using syscat.bufferpools for bufferpool pages estimate, and database configuration for sortheap size, issue:

C:\>db2fopt sample update opt_buffpage -1 opt_sortheap -1

Update succeeded

Make sure to terminate and reconnect to the database.

To make sure that they are reset, use the get option in db2fopt again:

C:\>db2fopt sample get opt_buffpage opt_sortheap

opt_buffpage value is -1
opt_sortheap value is -1

If you're a DBA, you will probably be using the DB2 SQL Explain Tool (db2exfmt) to gain an understanding of your SQL access plan. The db2exfmt tool is used to format the contents of the explain tables. If you look at the output of one of the access plans using db2exfmt from production, you will notice the following at the top of the plan. (Note: For the most part, these parameters are picked up by the -f and -fd option in the db2look output, with the exception of the dbheap setting).


Listing 3. Sample output from db2exfmt
Database Context:
---------------- 
        Parallelism:            None				
        CPU Speed:              6.523521e-07       
       Comm Speed:             100 
        Buffer Pool size:       50000 
        Sort Heap size:         10000 
        Database Heap size:     5120 
        Lock List size:         1000 
        Maximum Lock List:      10 
        Average Applications:   1 
        Locks Available:        7849 

Package Context: 
--------------- 
        SQL Type:               Dynamic 
        Optimization Level:     5 
        Blocking:               Block All Cursors 
        Isolation Level:        Cursor Stability 

---------------- STATEMENT 1  SECTION 201 ---------------- 
        QUERYNO:                1 
        QUERYTAG:               CLP 
        Statement Type:         Select 
        Updatable:              No 
        Deletable:              No 
        Query Degree:           1 

If you go a bit further down in the db2exfmt output, right after the access plan, you will see if you have any registry settings that affect the optimizer plan.

Note: Again, unfortunately not all the relevant registry variables are listed by db2look -f. You will need to add the ones that are missing. In general, your registry variable settings on the test system should be identical, or as close as possible, to the settings on production.


Listing 4. Registry settings that affect access plan
1) RETURN: (Return Result) 
        Cumulative Total Cost:          57.6764 
        Cumulative CPU Cost:            191909 
        Cumulative I/O Cost:            2 
        Cumulative Re-Total Cost:       5.37264 
        Cumulative Re-CPU Cost:         134316 
        Cumulative Re-I/O Cost:         0 
        Cumulative First Row Cost:      26.9726 
        Estimated Buffer pool Buffers:   2 

        Arguments: 
        --------- 
        BLDLEVEL: (Build level) 
                DB2 v8.1.0.80 : s041221 
        ENVVAR  : (Environment Variable) 
	    	DB2_ANTIJOIN=yes 
                DB2_INLIST_TO_NLJN = yes 
        STMTHEAP: (Statement heap size) 
                2048 

Create data definition language (DDL)

The following db2look command creates the DDL to duplicate all database objects, along with the configuration and statistical information.

db2look -d <dbname> -e -a -m -o db2look.out

Here we've used the following parameters:

  • -a: Generate statistics for all creators. If this option is specified, then the -u option will be ignored.
  • -e: Extract DDL file needed to duplicate database. This option generates a script containing DDL statements. The script can be run against another database to recreate database objects.
  • -m: Run the db2look utility in mimic mode. This option generates a script containing SQL UPDATE statements. These SQL UPDATE statements capture all the statistics. This script can be run against another database to replicate the original one. When the -m option is specified, the -p, -g, and -s options are ignored .

Gather statistics and DDL for a database subset

To gather statistics and ddl for only certain tables and related objects, use the following command:

db2look -d <dbname> -e -a -m -t <table1> <table2> .. <tableX> -o table.ddl 

Here, I've used the following additional parameter:

Note: The -m option is very important. This option will collect all the statistics from the system tables. The statistics must be the same in test as they are in production and are key to your being able to mimic the production environment in your test environment.

  • -t: Generate statistics for the specified tables. The maximum number of tables that can be specified is 30.

In addition, if you do not use the -a option, you could use the -zoption:

  • -z: Schema name. If -z and -a are both specified, then -z will be ignored. Schema name is ignored for the federated section.

More details db2exfmt output

Database manager level configuration parameters

Note: Use the command db2 "get dbm cfg", in order to look at these parameters and db2 "update dbm cfg using <parameter> <value>" to update a database manager configuration parameter.

Parallelism: 
This parameter indicates whether inter- or intra-partition parallelism is enabled. If this is DPF with multiple partitions, then you will see Inter Partition Parallelism. If this is just SMP (intra_parallel enabled) single node environment, then you will see Intra Partition Parallelism. If both intra_parallel enabled and multiple partition environment, you will see both Inter and Intra partitions parallelismfor this parameter. And finally, if there is no inter- or intra-parallelism, this parameter will show NONE.

CPU Speed (cpuspeed): 
The CPU speed (in milliseconds per instruction) is used by the SQL optimizer to estimate the cost of performing certain operations.

Communications speed: (comm_bandwidth) 
The value specified for the communications bandwidth (in megabytes per second) is used by the SQL optimizer to estimate the cost of performing certain operations between partition servers of a partitioned database system.

Database level configuration parameters

Note: Use the command db2 "get db cfg for <dbname>" in order to look at these parameters and db2 "update db cfg for <dbname> using <parameter> <value>") to update a database configuration parameter.

Buffer pool size: 
The buffer pool size shown in db2exfmt output is determined by the buffpage parameter, if using buffpage as default for one buffer pool, or a calculation based on the contents of syscat.bufferpools. The number shown is the total number of buffer pool pages that are allocated for the database. For example, let's say we have the following buffer pools:


Table 1. Buffer pool setup
BUFFERPOOLNAMESIZE
IBMDEFAULTBP1000
BP11000
BP24000
BPIND11000
BPIND21000
BPLONG1000
BPTEMP1000
Total:10,000

The db2exfmt output would show the total size as the sum of the number of pages in all the bufferpools. In our example above, it is 10,000. Note: Pagesize does not matter, just the number of pages.

You could use the -fd option in db2look to use the db2fopt alternative if you cannot afford to have the same amount of buffer pool allocated in test as in production.

In MPP, the opt_buffpage is calculated per node, as the optimizer uses the total buffer pool information for the node on which the query is running. Hence, this change will only apply to the node on which this tool is being run.

Sort heap size (SORTHEAP) 
This parameter defines the maximum number of private memory pages to be used for private sorts or the maximum number of shared memory pages to be used for shared sorts.

You should set this to the same value as in production. Again, using the -fd option in db2look, you will notice the following:

!db2fopt SAMPLE update opt_sortheap 256;

This will override the sortheap configuration parameter, and this is what the optimizer will use as the sortheap value. Again, in reality, the actual sortheap allocated at runtime will be determined by the sortheap setting in the database configuration. As withopt_buffpage, you can use opt_sortheap if you cannot afford to allocate the same size of sortheap on your test system as you can on production.

Database heap size: (DBHEAP) 
There is one database heap per database, and the database manager uses it on behalf of all applications connected to the database. It contains control block information for tables, indexes, table spaces, and buffer pools.

Lock list size: (LOCKLIST) 
This parameter indicates the amount of storage that is allocated to the lock list.

Maximum lock list: (MAXLOCKS) 
This parameter defines a percentage of the lock list held by an application that must be filled before the database manager performs escalation.

The locklist and maxlocks would help determine the type of locks that will be held during a certain scan (index scan or table scan), along with the isolation level. For example, in the plan you will notice, say, an index scan operation:

	 IXSCAN: (Index Scan)

        		TABLOCK : (Table Lock intent)
                	INTENT SHARE

Note: Do not be concerned if Locks Available differs in your db2exfmt output from your test system, compared to production -- the difference has no effect on query planning.

Average applications: (AVG_APPLS) 
This parameter is used by the SQL optimizer to help estimate how much buffer pool will be available at run-time for the access plan chosen (since the buffer pool is shared by all active applications connected to the database).

Optimization Level: (DFT_QUERYOPT) 
The query optimization class is used to direct the optimizer to use different degrees of optimization when compiling SQL queries

Query Degree: (DFT_DEGREE) 
The degree of intra-partition parallelism for an SQL statement. if set to ANY, the optimizer is sensitive to the actual number of cpus that are online. if you use ANY, then the number of cpus on test and production should be configured the same, unless intra_parallel is disabled.

In addition to the above changes, there are some others that you must make sure are the same.

Number of frequent values retained: (NUM_FREQVALUES) 
This parameter allows you to specify the number of "most frequent values" that will be collected when the WITH DISTRIBUTIONoption is specified on the RUNSTATS command.

Number of quantiles retained: (NUM_QUANTILES) 
This parameter controls the number of quantiles that will be collected when the WITH DISTRIBUTION option is specified on theRUNSTATS command.

The above two, NUM_FREQVALUES and NUM_QUANTILES must be the same on the test system as in production in order to make sure you collect the same number of frequent and quantile values on test system as in production.

SQL statement heap (4KB): (STMTHEAP) 
The statement heap is used as a workspace for the SQL compiler during compilation of an SQL statement. This parameter specifies the size of this workspace. If this parameter is smaller on test than that in production, you may start seeing SQL0101N message due to lack of space in statement heap needed to compile the query. As well, you may see SQL0437W RC=1 , dropping down to greedy join enumeration if there is not enough statement heap for dynamic join enumeration.

37.华为路由器:loopback(本地回环)接口的作用 本地环回接口(或地址),亦称回送地址(loopback address)。 此类接口是应用最为广泛的一种虚接口,几乎在每台路由器上都会使用。常见于如下用途: 1 作为一台路由器的管理地址 系统管理员完成网络规划之后,为了方便管理,会为每一台路由器创建一个loopback 接口,并在该接口上单独指定一个IP 地址作为管理地址 ,管理员会使用该地址对路由器远程登录(telnet ),该地址实际上起到了类似设备名称一类的功能。 但是通常每台路由器上存在众多接口和地址,为何不从当中随便挑选一个呢 ? 原因如下:由于 阅读详情

相关推荐

利用Pandas进行高效网络数据获取

本文将重点介绍如何使用Pandas库进行网络爬虫。爬取数据是获取互联网上信息的常见方式之一,而Pandas作为一种强大的数据处理和分析工具,为我们提供了便捷的方法来处理和清洗从网页上获取的数据。文章将从爬取网页数据开始,包括使用Python的Requests库发送HTTP请求获取网页内容,并使用Pandas的功能来解析和提取所需的数据。我们还将讨论如何处理网页中的表格数据、处理和清洗数据、保存数据到文件等常见任务。

ak_bingbing的博客 1438

DB2 SQL 性能优化案例——索引对 SQL 性能的影响

摘自:http://www.ibm.com/developerworks/cn/data/library/techarticle/dm-1511-db2sql-optmize/index.html ...

698

Transformer模型详解(图解最完整版)

Transformer由论文提出,现在是谷歌云TPU推荐的参考模型。论文相关的Tensorflow的代码可以从GitHub获取,其作为Tensor2Tensor包的一部分。哈佛的NLP团队也实现了一个基于PyTorch的版本,并注释该论文。在本文中,我们将试图把模型简化一点,并逐一介绍里面的核心概念,希望让普通读者也能轻易理解。Transformer 与 RNN 不同,可以比较好地并行训练。

2501_91695094的博客 2702

DB2索引优化

问题描述https://www.cndba.cn/hbhe0316/article/4813 https://www.cndba.cn/hbhe0316/article/4813 https://www.cndba.cn/hbhe0316/article/4813https://www.cndba.cn/hbhe0316/article/4813 影响性能的 SQ...

hbhe0316的专栏 941

python实现语音信号的分帧、加窗、预处理

语音信号实现分帧、加窗、预处理音频文件读取预加重分帧加窗 音频文件读取 librosa是非常强大的python语音信号处理库。 读取音频: 使用语句librosa.load(path, sr=22050, mono=True, offset=0.0, duration=None)读取音频文件,默认的采样率是22050,若要保留音频的原始采样率,使用sr=None。 其中: path:表示音频文件的路径 sr:表示采样率 mono:bool,是布尔类型,表示是否将信号转换为单声道 offset:float,后

weixin_45272908的博客 1万+

仪表数字图像识别的传统方法

虽然现有很多机器学习算法能够准确地识别数字,但是传统方法对于一些需要离线识别且计算能力有限的下位机设备来说,仍然有非常不错的效果。因此,今天就向大家讲解一下传统的数字识别方法在仪表读数方面的应用。 1.图像预处理技术 1.1 主要流程 图像处理依次需要进行图片预处理、字轮区域定位、字符分割和字符识别等过程。其中图像处理流程如下图所示。 2. 详细过程 2.1 灰度化 为了减小图像原始数据量,本系...

XYZ 4523

使用DB2优化概要强制修改DB2的执行计划

如何人为干预DB2的执行计划(access plan)

匿_名_用_户的专栏 2883

.ipynb文件深度解析:从JSON结构到Jupyter Notebook高效使用指南

在Python开发与数据处理领域,交互式编程正成为探索数据与验证思路的高效方式。Jupyter Notebook作为最流行的交互式环境之一,其默认文件格式.ipynb本质是一个基于JSON的文本文件,内部通过单元格组织代码、说明文字与运行结果。理解其JSON结构,不仅有助于掌握Notebook的存储原理,更能为文件损坏修复、版本控制与自动化转换提供基础。依托对单元格类型、魔法命令及输出可视化的熟练运用,数据分析和数据可视化流程可以变得更为流畅。同时,借助VS Code、nbconvert等工具,开发者能将.

weixin_28839629的博客 350

db2expln 查看执行plan

>db2cmd >db2expln -d your_dbname -u your_username your_passwd -z ; -f your_filename -g -o your_output_name

2302

FPGA中参数化SPI接口设计与Verilog实现

SPI(串行外设接口)作为嵌入式系统的核心通信协议,通过全双工、高速率特性在FPGA与Flash、ADC等外设交互中占据重要地位。参数化设计通过抽象时钟极性、数据位宽等可配置维度,采用分层架构实现硬件复用,显著提升开发效率。Verilog实现需重点处理跨时钟域同步和可配置帧结构,结合AXI总线集成与UVM验证方法学,可构建适应工业控制、物联网网关等场景的高可靠SPI解决方案。

ciya3282的博客 1408

Qt QChart实战:从零打造一个实时温度监控仪表盘(附完整源码)

本文详细介绍了如何使用Qt QChart模块从零构建一个工业级实时温度监控仪表盘。通过实战案例,展示了波形图的绘制、坐标轴配置、数据流模拟等关键技术,并提供了完整的源码实现,帮助开发者快速掌握Qt在数据可视化领域的应用。

weixin_42537919的博客 243

DB2 性能优化快速入门

李越 (liyyue@cn.ibm.com), 软件工程师, IBM王飞鹏 (wangfp@cn.ibm.com), 软件工程师, IBM 狄浩 (dihao@cn.ibm.com), 软件工程师, IBM 张蓉蓉 (rrzha...

644

EtherCAT主站SOEM -- 0 -- 该EtherCAT主站SOEM专栏后续安排

SOEM(Simple Open EtherCAT Master)是一个开源的EtherCAT主站库,允许开发者构建自定义的EtherCAT主站应用程序。EtherCAT是一种实时以太网通信协议,广泛应用于工业自动化和机器控制领域。开源性质:SOEM是一个开源项目,这意味着开发者可以自由地查看、修改和分发代码。这使其成为工业自动化领域的一个强大工具,可以根据具体需求进行定制。EtherCAT主站实现:SOEM库提供了一个完整的EtherCAT主站实现,允许主站与多个EtherCAT从站设备进行通信。

常驻客栈的博客--嵌入式EtherCAT 6667

db2 access plan

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34413802的博客 307

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

DB2中如何查看执行计划

本文讲述了DB2中查看执行计划的方法,包括动态SQL的执行计划,存储过程、包的执行计划,以及如何查看package cache中的执行计划

匿_名_用_户的专栏 3万+

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

db2expln参数详解

db2是通过 db2expln命令来查看sql执行计划,来做sql优化的,比如: db2expln -d appdb -q " select count(*) from tpcd.part, tpcd.partsupp, tpcd.supplier where p_partkey = ps_partkey and s_suppkey = ps_suppkey an p_size = 30 and

飞在江湖的专栏 1万+

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

循序渐进DB2(第2版)-第6章 数据移动

目录 6.1.数据移动格式 6.1.1.定界ASCII文件格式(DEL/ASCII) 6.1.2.非定界ASCII文件格式 6.1.3.PC/IXF文件格式 6.1.4.WSF工作表文件格式 6.1.5.游标 6.2.EXPORT 6.2.1.EXPORTt概述 6.2.2.导出数据 6.3.IMPORT 6.3.1.IMPORT概述 6.3.2.导入数据 6.3.3.导入的工作机制 6.3.4.IMPORT限制 6.4.LOAD 6.4.1.LOAD概述 6.4.2.装入

狼行千里吃肉 1383

DB2锁等,锁超时等情况捕获分析

1.模拟锁等锁超时情况 1&gt;[test@demo SQLOGDIR]$ db2 get db cfg for testdb|grep -i lock Max storage for lock list (4KB) (LOCKLIST) = AUTOMATIC(4096) Percent. of lock lists per application ...

aryoyo的博客 2366

db2move,db2look使用及所遇到问题详解

先看我们最关心的问题 db2move用于快速导出/导入整个数据库的数据,操作过程: 1.数据导出: db2move DBNAME export -u userName -p password 2.数据导入: db2move DBNAME import -u userName -p password 注意:在linux下导入导出数据时要注意db2codepage的一致性,

荣耀之路 1万+

DB2 SQL执行计划

在oracle数据库中可以在sqlplus中打开trace选项后查看sql的执行计划,在DB2数据库中同样也有类似的功能,DB2提供了一个比较简单的工具db2expln工具来查看SQL的执行计划 可以通过输入db2expln来查看其帮助信息。 C:/Documents and Settings/liufeng>db2expln DB2 Universal Database Version 9

风的专栏 1万+

安装DB2数据库时出现的问题及解决方式

1. 注意问题 安装完DB2数据库后,需要将运行DB2本地应用程序或工具的DB2用户添加至DB2管理员组或DB2用户组。 操作:管理工具--计算机管理--本地用户和组   2. 出现的问题   (1)问题描述:新建数据库时提示“SQL1219N  因为未能分配专用虚拟内存,所以请求失败。”  产生原因:大量的应用程序过度的使用内存,导致虚拟内存的产生;数据库死锁;安全机制

禾青的记录 3116

db2 查看执行计划

--db2执行计划学习 --(1) vi 1.sql selecT * from child where chil_id=184 db2expln -d vaccyn -t -f 1.sql ---------执行计划 [db2inst1@localhost ~]$ db2expln -d vaccyn -t -f 1.sql DB2 Universal Databa

"杰"出虚拟平台-数据运维~~ 2890

(转)SQL1092N "USER" does not have the authority to perform therequested command -

http://dbaspot.com/forums/db2-udb/203214-sql1092n-user-does-not-have-authority-perform-therequested-command.html SQL1092N "USER" does not have the authority to perform therequested command - ...

mlxia的专栏 1188

(转)DB2 SQL Error: SQLCODE=-964, SQLSTATE=57011的原因及解决方法

http://blog.sina.com.cn/s/blog_4a3883790100qpqd.html DB2 SQL Error: SQLCODE=-964, SQLSTATE=57011的原因及解决方法  (2011-04-06 11:43:36) 转载 标签:  db2   日志文件   数据库   杂谈 分类: 数据库 ...

mlxia的专栏 1157

(转)DB2中ALTER TABLE为什么需要REORG操作?

http://www.flatws.cn/article/program/db2/2011-05-04/24074.html DB2中ALTER TABLE为什么需要REORG操作? 减小字体 增大字体 ALTER TABLE操作在日常开发中很常见,下面是摘自DB2官网关于ALTER TABLE操作的一段话。 Perhaps the most important thing t...

mlxia的专栏 982
上一篇: (转)iPod classic 技术规格
下一篇: (转)【俊哥儿张】DB2:学习 DB2LOOK 命令
mlxia
博客等级 码龄26年 28粉丝 410原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值