#!/bin/ksh # # EMP7 Benchmark - SQL script - Informix version # v.1.0.0 # Copyright (C) 2009 Alessandro Governa, meo@bogliolo.name # export P=/app/informix/bin export SCRIPT_DIR=/app/informix/scripts export CONN="stores7@test115" # $P/dbaccess $CONN <> $SCRIPT_DIR/bench.log 2>&1 drop table "informix".emp7; create table "informix".emp7(EMPNO integer not null,ENAME VARCHAR(10),JOB VARCHAR(9), MGR integer,HIREDATE DATE,SAL float,COMM float,DEPTNO integer); create unique index "informix".pkemp7 on "informix".emp7(EMPNO); insert into "informix".emp7(empno, ename, deptno) values(1,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(2,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(3,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(4,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(5,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(6,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(7,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(8,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(9,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(10,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(11,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(12,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(13,'SMITH',10); insert into "informix".emp7(empno, ename, deptno) values(14,'SMITH',10); update statistics for table "informix".emp7; # date $P/dbaccess $CONN <> $SCRIPT_DIR/bench.log 2>&1 select count(*) from "informix".emp7 emp1, emp7 emp2, emp7 emp3, emp7 emp4, emp7 emp5, emp7 emp6, emp7 emp_7 where emp_7.deptno=10; EOF # date $P/dbaccess $CONN <> $SCRIPT_DIR/bench.log 2>&1 select count(*) from "informix".emp7 emp1, emp7 emp2, emp7 emp3, emp7 emp4, emp7 emp5, emp7 emp6, emp7 emp_7 where emp_7.deptno=10; EOF date