mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-18 21:44:02 +03:00
chore(codestyle): MCOL-5405: repace windows CRLF with virtious linux one
This commit is contained in:
parent
323c8822d5
commit
1d25cf3afd
@ -1,24 +1,24 @@
|
||||
CMake Super Build
|
||||
=================
|
||||
A super build is a process to download, build and install dependencies with cmake at configure time. This ensure dependencies are available during the initial configure stage. Its accomplished by executing separate cmake configure and build processes inline with the main project cmake which builds and installs the missing dependency.
|
||||
|
||||
Rationale:
|
||||
----------
|
||||
It maybe observed that ExternalProject accomplishes a similar task, however, the target of an ExternalProject is not available until after the build stage. Any scripting logic which requires the dependency during the configure stage will fail. The super build solves this by ensuring the dependency is built independent of the main projects configuration which uses it.
|
||||
|
||||
Example:
|
||||
--------
|
||||
# In the context of the main projects cmake scripts, subshells of cmake are executed to configure and build the dependency
|
||||
configure_file(some_dependency.CMakeLists.txt.in some_dep_dir\CMakeLists.txt @ONLY) # drop a top-level CMakeLists.txt in a folder for the dependency
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} . WORKING_DIRECTORY some_dep_dir) # execute configure stage of dependency against newly created CMakeLists.txt from above step
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY some_dep_dir) # install the dependency
|
||||
find_package(some_dependency) # the dependency should be installed and can be 'found' or used as appropriate
|
||||
|
||||
NOTES
|
||||
-----
|
||||
o The bulk of the work is performed in the generated/copied CMakeLists.txt to download (optional), build and install the dependency. It typically contains the full set of ExternalProject statements and error handling.
|
||||
o CMake scripts executed in a sub-process with execute_process are independent and share no state whatsoever with the calling process. There are two ways to share state with the sub-shell
|
||||
- Wrap appropriate @VARIABLE@ decorations in the CMakeLists.in template which get substituted with values when configure_file is executed
|
||||
- Pass them on the command line of the execute_process statement. e.g.: execute_process(COMMAND ${CMAKE_COMMAND} -DSOME_VAR=${SOME_VAL} -DANOTHER_VAR=${ANOTHER_VAL} ...
|
||||
|
||||
CMake Super Build
|
||||
=================
|
||||
A super build is a process to download, build and install dependencies with cmake at configure time. This ensure dependencies are available during the initial configure stage. Its accomplished by executing separate cmake configure and build processes inline with the main project cmake which builds and installs the missing dependency.
|
||||
|
||||
Rationale:
|
||||
----------
|
||||
It maybe observed that ExternalProject accomplishes a similar task, however, the target of an ExternalProject is not available until after the build stage. Any scripting logic which requires the dependency during the configure stage will fail. The super build solves this by ensuring the dependency is built independent of the main projects configuration which uses it.
|
||||
|
||||
Example:
|
||||
--------
|
||||
# In the context of the main projects cmake scripts, subshells of cmake are executed to configure and build the dependency
|
||||
configure_file(some_dependency.CMakeLists.txt.in some_dep_dir\CMakeLists.txt @ONLY) # drop a top-level CMakeLists.txt in a folder for the dependency
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} . WORKING_DIRECTORY some_dep_dir) # execute configure stage of dependency against newly created CMakeLists.txt from above step
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY some_dep_dir) # install the dependency
|
||||
find_package(some_dependency) # the dependency should be installed and can be 'found' or used as appropriate
|
||||
|
||||
NOTES
|
||||
-----
|
||||
o The bulk of the work is performed in the generated/copied CMakeLists.txt to download (optional), build and install the dependency. It typically contains the full set of ExternalProject statements and error handling.
|
||||
o CMake scripts executed in a sub-process with execute_process are independent and share no state whatsoever with the calling process. There are two ways to share state with the sub-shell
|
||||
- Wrap appropriate @VARIABLE@ decorations in the CMakeLists.in template which get substituted with values when configure_file is executed
|
||||
- Pass them on the command line of the execute_process statement. e.g.: execute_process(COMMAND ${CMAKE_COMMAND} -DSOME_VAR=${SOME_VAL} -DANOTHER_VAR=${ANOTHER_VAL} ...
|
||||
|
||||
x
|
@ -1,188 +1,188 @@
|
||||
-- test column data types
|
||||
ALTER TABLE calpont.tbl_name ADD COLUMN col_name char(1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(2) engine=infinidb;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(4) engine = infinidb;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(8);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name varchar(50);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name bit;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name bit(8);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name bit(63);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name real(5);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name real(10,2);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(2,2);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(5,4);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(10,8);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name float(25);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name float(25,10);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name double;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name bigint;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name medint;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name smallint;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name tinyint;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name date;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name datetime;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name clob;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name blob;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(7);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(1,1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(8,1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(20,10);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name number;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name integer;
|
||||
ALTER TABLE tbl_name ADD col_name int;
|
||||
ALTER TABLE tbl_name ADD col_name CHAR (4);
|
||||
|
||||
|
||||
-- test column constraints
|
||||
ALTER TABLE calpont.tbl_name ADD COLUMN col_name datetime not null;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name float(25,10) null engine=infinidb;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int auto_increment;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(10,2) default 1;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default 'unknown';
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default USER;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default CURRENT_USER;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default SESSION_USER;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default SYSTEM_USER;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default NULL;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name clob check (col_name < 0),
|
||||
alter table tbl_name add column col_name int check (col_name > 1) initially deferred deferrable;
|
||||
alter table tbl_name add column col_name integer check (col_name = 1) initially immediate not deferrable;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(5,2) primary key;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(25,2) primary key disabled;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(25) primary key DEFERRED;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int references tbl_name1(col_name);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int references tbl_name1(col_name, col_name1);
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int unique;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(8,2) unique DISABLE;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(8) unique DEFERRED;
|
||||
|
||||
|
||||
-- test out-of-line constraints
|
||||
ALTER TABLE calpont.tbl_name ADD CONSTRAINT const_name check (col_name) (col_name > 0);
|
||||
alter table tbl_name add check (col_name) (col_name > 0) DEFERRED engine=infinidb;
|
||||
alter table tbl_name add const_name check (col_name) (col_name > 0) DISABLE;
|
||||
|
||||
alter table tbl_name add CONSTRAINT const_name primary key (col_name);
|
||||
alter table tbl_name add const_name primary key(col_name);
|
||||
alter table tbl_name add primary key (col_name);
|
||||
alter table tbl_name add const_name primary key (col_nam,col_name1);
|
||||
|
||||
alter table tbl_name add CONSTRAINT const_name unique(col_name);
|
||||
alter table tbl_name add unique(col_name);
|
||||
alter table tbl_name add const_name unique col_name DISABLE;
|
||||
alter table tbl_name add const_name unique col_name DEFERRED;
|
||||
alter table tbl_name add const_name unique (col_name, col_name1);
|
||||
|
||||
ALTER TABLE tbl_name add CONSTRAINT const_name foreign key(col_name) references Customers( p_a );
|
||||
ALTER TABLE tbl_name ADD FOREIGN KEY(col_name) references Customers( p_a );
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a );
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a,p_b ) MATCH FULL;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) MATCH PARTIAL;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON UPDATE CASCADE;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON UPDATE SET NULL;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON UPDATE SET DEFAULT;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON UPDATE NO ACTION;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON DELETE CASCADE;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON DELETE SET NULL;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON DELETE SET DEFAULT;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON DELETE NO ACTION;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a );
|
||||
|
||||
ALTER TABLE tbl_name storage(initial 100000 next 200000);
|
||||
|
||||
|
||||
-- test contsraint state
|
||||
alter table calpont.tbl_name DISABLE constraint const_name;
|
||||
alter table tbl_name ENABLE constraint const_name engine=infinidb;
|
||||
|
||||
|
||||
-- test alter column
|
||||
alter table calpont.tbl_name alter col_name drop not null;
|
||||
alter table tbl_name alter col_name drop null engine=infinidb;
|
||||
alter table tbl_name alter col_name drop default;
|
||||
alter table tbl_name alter col_name drop auto_increment;
|
||||
ALTER TABLE tbl_name ALTER COLUMN col_name DROP DEFAULT;
|
||||
|
||||
alter table tbl_name alter col_name set not null;
|
||||
alter table tbl_name alter col_name set null;
|
||||
alter table tbl_name alter col_name set default 3;
|
||||
alter table tbl_name alter col_name set default 'unknown';
|
||||
alter table tbl_name alter col_name set default USER;
|
||||
alter table tbl_name alter col_name set default CURRENT_USER;
|
||||
alter table tbl_name alter col_name set default SESSION_USER;
|
||||
alter table tbl_name alter col_name set default SYSTEM_USER;
|
||||
alter table tbl_name alter col_name set default NULL;
|
||||
alter table tbl_name alter col_name set auto_increment;
|
||||
ALTER TABLE tbl_name ALTER COLUMN col_name SET DEFAULT;
|
||||
|
||||
|
||||
-- test drop column
|
||||
alter table calpont.tbl_name drop col_name engine=infinidb;
|
||||
ALTER TABLE tbl_name DROP col_name CASCADE;
|
||||
ALTER TABLE tbl_name DROP col_name RESTRICT;
|
||||
ALTER TABLE tbl_name DROP col_name INVALIDATE;
|
||||
ALTER TABLE tbl_name DROP col_name CASCADE CONSTRAINTS;
|
||||
ALTER TABLE tbl_name DROP ( col_name , col_name1) CASCADE CONSTRAINTS;
|
||||
alter table tbl_name drop column col_name;
|
||||
|
||||
|
||||
-- test rename column and table
|
||||
alter table calpont.tbl_name rename col_name to col_name1;
|
||||
alter table tbl_name rename column col_name to col_name1 engine=infinidb;
|
||||
ALTER TABLE tbl_name RENAME COLUMN col_name to col_name1;
|
||||
ALTER TABLE tbl_name RENAME to new_tbl_name ;
|
||||
|
||||
|
||||
-- test set column
|
||||
alter table tbl_name set unused col_name;
|
||||
alter table tbl_name set unused (col_name,col_name1);
|
||||
|
||||
|
||||
-- test MAX name sizes
|
||||
ALTER TABLE tbl_name0123456789012345678901234567890 ADD COLUMN col_name char(1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name90123456789012345678901234567890 char(1);
|
||||
ALTER TABLE schema7890123456789012345678901234567890.tbl_name ADD COLUMN col_name char(1);
|
||||
ALTER TABLE tbl_name ADD CONSTRAINT const_name123456789012345678901234567890 CHECK(col_name > 1);
|
||||
ALTER TABLE schema7890123456789012345678901234567890.tbl_name0123456789012345678901234567890 ADD CONSTRAINT const_name123456789012345678901234567890 CHECK(col_name90123456789012345678901234567890 > 1);
|
||||
|
||||
|
||||
-- test combination request
|
||||
ALTER TABLE tbl_name ADD (col_name int, col_name1 timestamp, col_name2 NUMERIC(7));
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int null references Customers(col_name);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int NOT null auto_increment default 1000 references tbl_name1(col_name);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name clob not null check (col_name < 0),
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(25,2) primary key unique check (col_name = 50);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(25,2) primary key unique check (col_name = 50) disable references tbl_name2(col_name1) DEFERRED;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name real(10,2) ADD CONSTRAINT const_name (p_partkey) (p_partkey > 0);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name float(10,2) NOT null auto_increment default 1000 primary key DEFERRED unique DISABLED check (col_name = 50) references tbl_name1(col_name) engine=infinidb;
|
||||
|
||||
|
||||
-- test big do all test
|
||||
ALTER TABLE calpont.tbl_name
|
||||
ADD (
|
||||
col_name float(10,2) NOT null auto_increment default 1000 primary key DEFERRED unique DISABLED check (col_name = 50) references tbl_name1(col_name),
|
||||
col_name1 timestamp ,
|
||||
col_name2 NUMERIC(7)
|
||||
)
|
||||
ADD CONSTRAINT const_name check (col_name2) (col_name2 > 0)
|
||||
add CONSTRAINT const_name1 primary key (col_name2)
|
||||
add CONSTRAINT const_name2 unique(col_name1)
|
||||
add CONSTRAINT const_name3 foreign key(col_name) references Customers( p_a )
|
||||
storage(initial 100000 next 200000)
|
||||
DISABLE constraint const_name
|
||||
alter col_name drop not null
|
||||
alter table tbl_name alter col_name2 set default 'unknown'
|
||||
DROP ( col_name , col_name1) CASCADE CONSTRAINTS
|
||||
RENAME COLUMN col_name to col_name1;
|
||||
RENAME to new_tbl_name
|
||||
alter table tbl_name set unused (col_name,col_name1)
|
||||
engine=infinidb;
|
||||
|
||||
-- test column data types
|
||||
ALTER TABLE calpont.tbl_name ADD COLUMN col_name char(1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(2) engine=infinidb;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(4) engine = infinidb;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(8);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name varchar(50);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name bit;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name bit(8);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name bit(63);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name real(5);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name real(10,2);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(2,2);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(5,4);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(10,8);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name float(25);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name float(25,10);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name double;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name bigint;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name medint;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name smallint;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name tinyint;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name date;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name datetime;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name clob;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name blob;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(7);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(1,1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(8,1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(20,10);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name number;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name integer;
|
||||
ALTER TABLE tbl_name ADD col_name int;
|
||||
ALTER TABLE tbl_name ADD col_name CHAR (4);
|
||||
|
||||
|
||||
-- test column constraints
|
||||
ALTER TABLE calpont.tbl_name ADD COLUMN col_name datetime not null;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name float(25,10) null engine=infinidb;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int auto_increment;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(10,2) default 1;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default 'unknown';
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default USER;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default CURRENT_USER;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default SESSION_USER;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default SYSTEM_USER;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name char(1) default NULL;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name clob check (col_name < 0),
|
||||
alter table tbl_name add column col_name int check (col_name > 1) initially deferred deferrable;
|
||||
alter table tbl_name add column col_name integer check (col_name = 1) initially immediate not deferrable;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(5,2) primary key;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(25,2) primary key disabled;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(25) primary key DEFERRED;
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int references tbl_name1(col_name);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int references tbl_name1(col_name, col_name1);
|
||||
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int unique;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(8,2) unique DISABLE;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name decimal(8) unique DEFERRED;
|
||||
|
||||
|
||||
-- test out-of-line constraints
|
||||
ALTER TABLE calpont.tbl_name ADD CONSTRAINT const_name check (col_name) (col_name > 0);
|
||||
alter table tbl_name add check (col_name) (col_name > 0) DEFERRED engine=infinidb;
|
||||
alter table tbl_name add const_name check (col_name) (col_name > 0) DISABLE;
|
||||
|
||||
alter table tbl_name add CONSTRAINT const_name primary key (col_name);
|
||||
alter table tbl_name add const_name primary key(col_name);
|
||||
alter table tbl_name add primary key (col_name);
|
||||
alter table tbl_name add const_name primary key (col_nam,col_name1);
|
||||
|
||||
alter table tbl_name add CONSTRAINT const_name unique(col_name);
|
||||
alter table tbl_name add unique(col_name);
|
||||
alter table tbl_name add const_name unique col_name DISABLE;
|
||||
alter table tbl_name add const_name unique col_name DEFERRED;
|
||||
alter table tbl_name add const_name unique (col_name, col_name1);
|
||||
|
||||
ALTER TABLE tbl_name add CONSTRAINT const_name foreign key(col_name) references Customers( p_a );
|
||||
ALTER TABLE tbl_name ADD FOREIGN KEY(col_name) references Customers( p_a );
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a );
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a,p_b ) MATCH FULL;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) MATCH PARTIAL;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON UPDATE CASCADE;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON UPDATE SET NULL;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON UPDATE SET DEFAULT;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON UPDATE NO ACTION;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON DELETE CASCADE;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON DELETE SET NULL;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON DELETE SET DEFAULT;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a ) ON DELETE NO ACTION;
|
||||
alter table tbl_name add foreign key (col_name,col_name1) references Customers( p_a );
|
||||
|
||||
ALTER TABLE tbl_name storage(initial 100000 next 200000);
|
||||
|
||||
|
||||
-- test contsraint state
|
||||
alter table calpont.tbl_name DISABLE constraint const_name;
|
||||
alter table tbl_name ENABLE constraint const_name engine=infinidb;
|
||||
|
||||
|
||||
-- test alter column
|
||||
alter table calpont.tbl_name alter col_name drop not null;
|
||||
alter table tbl_name alter col_name drop null engine=infinidb;
|
||||
alter table tbl_name alter col_name drop default;
|
||||
alter table tbl_name alter col_name drop auto_increment;
|
||||
ALTER TABLE tbl_name ALTER COLUMN col_name DROP DEFAULT;
|
||||
|
||||
alter table tbl_name alter col_name set not null;
|
||||
alter table tbl_name alter col_name set null;
|
||||
alter table tbl_name alter col_name set default 3;
|
||||
alter table tbl_name alter col_name set default 'unknown';
|
||||
alter table tbl_name alter col_name set default USER;
|
||||
alter table tbl_name alter col_name set default CURRENT_USER;
|
||||
alter table tbl_name alter col_name set default SESSION_USER;
|
||||
alter table tbl_name alter col_name set default SYSTEM_USER;
|
||||
alter table tbl_name alter col_name set default NULL;
|
||||
alter table tbl_name alter col_name set auto_increment;
|
||||
ALTER TABLE tbl_name ALTER COLUMN col_name SET DEFAULT;
|
||||
|
||||
|
||||
-- test drop column
|
||||
alter table calpont.tbl_name drop col_name engine=infinidb;
|
||||
ALTER TABLE tbl_name DROP col_name CASCADE;
|
||||
ALTER TABLE tbl_name DROP col_name RESTRICT;
|
||||
ALTER TABLE tbl_name DROP col_name INVALIDATE;
|
||||
ALTER TABLE tbl_name DROP col_name CASCADE CONSTRAINTS;
|
||||
ALTER TABLE tbl_name DROP ( col_name , col_name1) CASCADE CONSTRAINTS;
|
||||
alter table tbl_name drop column col_name;
|
||||
|
||||
|
||||
-- test rename column and table
|
||||
alter table calpont.tbl_name rename col_name to col_name1;
|
||||
alter table tbl_name rename column col_name to col_name1 engine=infinidb;
|
||||
ALTER TABLE tbl_name RENAME COLUMN col_name to col_name1;
|
||||
ALTER TABLE tbl_name RENAME to new_tbl_name ;
|
||||
|
||||
|
||||
-- test set column
|
||||
alter table tbl_name set unused col_name;
|
||||
alter table tbl_name set unused (col_name,col_name1);
|
||||
|
||||
|
||||
-- test MAX name sizes
|
||||
ALTER TABLE tbl_name0123456789012345678901234567890 ADD COLUMN col_name char(1);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name90123456789012345678901234567890 char(1);
|
||||
ALTER TABLE schema7890123456789012345678901234567890.tbl_name ADD COLUMN col_name char(1);
|
||||
ALTER TABLE tbl_name ADD CONSTRAINT const_name123456789012345678901234567890 CHECK(col_name > 1);
|
||||
ALTER TABLE schema7890123456789012345678901234567890.tbl_name0123456789012345678901234567890 ADD CONSTRAINT const_name123456789012345678901234567890 CHECK(col_name90123456789012345678901234567890 > 1);
|
||||
|
||||
|
||||
-- test combination request
|
||||
ALTER TABLE tbl_name ADD (col_name int, col_name1 timestamp, col_name2 NUMERIC(7));
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int null references Customers(col_name);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name int NOT null auto_increment default 1000 references tbl_name1(col_name);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name clob not null check (col_name < 0),
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(25,2) primary key unique check (col_name = 50);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name numeric(25,2) primary key unique check (col_name = 50) disable references tbl_name2(col_name1) DEFERRED;
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name real(10,2) ADD CONSTRAINT const_name (p_partkey) (p_partkey > 0);
|
||||
ALTER TABLE tbl_name ADD COLUMN col_name float(10,2) NOT null auto_increment default 1000 primary key DEFERRED unique DISABLED check (col_name = 50) references tbl_name1(col_name) engine=infinidb;
|
||||
|
||||
|
||||
-- test big do all test
|
||||
ALTER TABLE calpont.tbl_name
|
||||
ADD (
|
||||
col_name float(10,2) NOT null auto_increment default 1000 primary key DEFERRED unique DISABLED check (col_name = 50) references tbl_name1(col_name),
|
||||
col_name1 timestamp ,
|
||||
col_name2 NUMERIC(7)
|
||||
)
|
||||
ADD CONSTRAINT const_name check (col_name2) (col_name2 > 0)
|
||||
add CONSTRAINT const_name1 primary key (col_name2)
|
||||
add CONSTRAINT const_name2 unique(col_name1)
|
||||
add CONSTRAINT const_name3 foreign key(col_name) references Customers( p_a )
|
||||
storage(initial 100000 next 200000)
|
||||
DISABLE constraint const_name
|
||||
alter col_name drop not null
|
||||
alter table tbl_name alter col_name2 set default 'unknown'
|
||||
DROP ( col_name , col_name1) CASCADE CONSTRAINTS
|
||||
RENAME COLUMN col_name to col_name1;
|
||||
RENAME to new_tbl_name
|
||||
alter table tbl_name set unused (col_name,col_name1)
|
||||
engine=infinidb;
|
||||
|
||||
|
526
dbcon/doc/02.sql
526
dbcon/doc/02.sql
@ -1,263 +1,263 @@
|
||||
-- $ID$
|
||||
-- TPC-H/TPC-R Minimum Cost Supplier Query (Q2)
|
||||
-- Functional Query Definition
|
||||
-- Approved February 1998
|
||||
:x
|
||||
:o
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
p_partkey,
|
||||
p_mfgr,
|
||||
s_address,
|
||||
s_phone,
|
||||
s_comment
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_size = :1
|
||||
and p_type like '%:2'
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = ':3'
|
||||
and ps_supplycost = (
|
||||
select
|
||||
min(ps_supplycost)
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = ':3'
|
||||
)
|
||||
order by
|
||||
s_acctbal desc,
|
||||
n_name,
|
||||
s_name,
|
||||
p_partkey;
|
||||
:n 100
|
||||
|
||||
select
|
||||
s_acctbal,
|
||||
p_partkey
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
r_name = ':3'
|
||||
and n_regionkey = r_regionkey
|
||||
and s_nationkey = n_nationkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_partkey = ps_partkey
|
||||
and p_size = :1
|
||||
and ps_supplycost = (
|
||||
select
|
||||
min(ps_supplycost)
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
r_name = ':3'
|
||||
and n_regionkey = r_regionkey
|
||||
and s_nationkey = n_nationkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_partkey = ps_partkey
|
||||
)
|
||||
|
||||
-- Sub SE
|
||||
GetTokensByCompare
|
||||
DDN = ?
|
||||
BOP = EQ
|
||||
Arg32 = ':3'
|
||||
COP32 = AND
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (r_name = ':3')
|
||||
TCN = 1 (region.r_name)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 2 (region.r_regionkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (n_regionkey = r_regionkey)
|
||||
TCN = 8 (nation.n_regionkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FiterResultStacksByColumn
|
||||
RSP1 = PREV-2
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 9 (nation.n_nationkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (s_nationkey = n_nationkey)
|
||||
TCN = 15 (supplier.s_nationkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 16 (supplier.s_suppkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (s_suppkey = ps_suppkey)
|
||||
TCN = 20 (partsupp.ps_suppkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 21 (partsupp.ps_partkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (p_partkey = ps_partkey)
|
||||
TCN = 25 (part.p_partkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetAggregateByOffset
|
||||
TCN = 21 (partsupp.ps_supplycost)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
AOP = SUM
|
||||
-- Parent SE
|
||||
GetColumnRowsByFTSCompare (ps_supplycose = subselect)
|
||||
TCN = 21 (partsupp.ps_supplycost)
|
||||
SCN = 1
|
||||
BOP = OR?
|
||||
Arg32 = PREV-0
|
||||
GetTokensByCompare
|
||||
DDN = ?
|
||||
BOP = EQ
|
||||
Arg32 = ':3'
|
||||
COP32 = AND
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (r_name = ':3')
|
||||
TCN = 1 (region.r_name)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 2 (region.r_regionkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (n_regionkey = r_regionkey)
|
||||
TCN = 8 (nation.n_regionkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FiterResultStacksByColumn
|
||||
RSP1 = PREV-2
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 9 (nation.n_nationkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (s_nationkey = n_nationkey)
|
||||
TCN = 15 (supplier.s_nationkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 16 (supplier.s_suppkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (s_suppkey = ps_suppkey)
|
||||
TCN = 20 (partsupp.ps_suppkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 21 (partsupp.ps_partkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (p_partkey = ps_partkey)
|
||||
TCN = 25 (part.p_partkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
??? filter p_size=1 from previous stack
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-0
|
||||
RSP2 = PREV-20
|
||||
GetColumnRowsByOffset
|
||||
TCN = 17 (supplier.s_acctbal)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
TCN = 25 (part.p_partkey)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-1
|
||||
-- $ID$
|
||||
-- TPC-H/TPC-R Minimum Cost Supplier Query (Q2)
|
||||
-- Functional Query Definition
|
||||
-- Approved February 1998
|
||||
:x
|
||||
:o
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
p_partkey,
|
||||
p_mfgr,
|
||||
s_address,
|
||||
s_phone,
|
||||
s_comment
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_size = :1
|
||||
and p_type like '%:2'
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = ':3'
|
||||
and ps_supplycost = (
|
||||
select
|
||||
min(ps_supplycost)
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = ':3'
|
||||
)
|
||||
order by
|
||||
s_acctbal desc,
|
||||
n_name,
|
||||
s_name,
|
||||
p_partkey;
|
||||
:n 100
|
||||
|
||||
select
|
||||
s_acctbal,
|
||||
p_partkey
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
r_name = ':3'
|
||||
and n_regionkey = r_regionkey
|
||||
and s_nationkey = n_nationkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_partkey = ps_partkey
|
||||
and p_size = :1
|
||||
and ps_supplycost = (
|
||||
select
|
||||
min(ps_supplycost)
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
r_name = ':3'
|
||||
and n_regionkey = r_regionkey
|
||||
and s_nationkey = n_nationkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_partkey = ps_partkey
|
||||
)
|
||||
|
||||
-- Sub SE
|
||||
GetTokensByCompare
|
||||
DDN = ?
|
||||
BOP = EQ
|
||||
Arg32 = ':3'
|
||||
COP32 = AND
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (r_name = ':3')
|
||||
TCN = 1 (region.r_name)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 2 (region.r_regionkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (n_regionkey = r_regionkey)
|
||||
TCN = 8 (nation.n_regionkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FiterResultStacksByColumn
|
||||
RSP1 = PREV-2
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 9 (nation.n_nationkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (s_nationkey = n_nationkey)
|
||||
TCN = 15 (supplier.s_nationkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 16 (supplier.s_suppkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (s_suppkey = ps_suppkey)
|
||||
TCN = 20 (partsupp.ps_suppkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 21 (partsupp.ps_partkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (p_partkey = ps_partkey)
|
||||
TCN = 25 (part.p_partkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetAggregateByOffset
|
||||
TCN = 21 (partsupp.ps_supplycost)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
AOP = SUM
|
||||
-- Parent SE
|
||||
GetColumnRowsByFTSCompare (ps_supplycose = subselect)
|
||||
TCN = 21 (partsupp.ps_supplycost)
|
||||
SCN = 1
|
||||
BOP = OR?
|
||||
Arg32 = PREV-0
|
||||
GetTokensByCompare
|
||||
DDN = ?
|
||||
BOP = EQ
|
||||
Arg32 = ':3'
|
||||
COP32 = AND
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (r_name = ':3')
|
||||
TCN = 1 (region.r_name)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 2 (region.r_regionkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (n_regionkey = r_regionkey)
|
||||
TCN = 8 (nation.n_regionkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FiterResultStacksByColumn
|
||||
RSP1 = PREV-2
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 9 (nation.n_nationkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (s_nationkey = n_nationkey)
|
||||
TCN = 15 (supplier.s_nationkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 16 (supplier.s_suppkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (s_suppkey = ps_suppkey)
|
||||
TCN = 20 (partsupp.ps_suppkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 21 (partsupp.ps_partkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (p_partkey = ps_partkey)
|
||||
TCN = 25 (part.p_partkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
??? filter p_size=1 from previous stack
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-0
|
||||
RSP2 = PREV-20
|
||||
GetColumnRowsByOffset
|
||||
TCN = 17 (supplier.s_acctbal)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
TCN = 25 (part.p_partkey)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-1
|
||||
|
226
dbcon/doc/03.sql
226
dbcon/doc/03.sql
@ -1,114 +1,114 @@
|
||||
-- $ID$
|
||||
-- TPC-H/TPC-R Shipping Priority Query (Q3)
|
||||
-- Functional Query Definition
|
||||
-- Approved February 1998
|
||||
:x
|
||||
:o
|
||||
select
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
c_mktsegment = ':1'
|
||||
and c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate < date ':2'
|
||||
and l_shipdate > date ':2'
|
||||
group by
|
||||
l_orderkey,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
order by
|
||||
revenue desc,
|
||||
o_orderdate;
|
||||
:n 10
|
||||
|
||||
select
|
||||
l_orderkey,
|
||||
o_orderdate
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
c_mktsegment = 'AUTOMOBILE'
|
||||
and c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate < '1995-01-01'
|
||||
and l_shipdate > '1995-01-01'
|
||||
|
||||
GetTokensByCompare
|
||||
DDN = ?
|
||||
BOP = EQ
|
||||
Arg32 = 'AUTOMOBILE'
|
||||
COP32 = AND
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (c_mktsegment = 'AUTOMOBILE')
|
||||
TCN = 1 (customer.c_mktsegment)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 2 (customer.c_custkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (c_custkey = o_custkey)
|
||||
TCN = 8 (orders.o_custkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FiterResultStacksByColumn
|
||||
RSP1 = PREV-2
|
||||
RSP2 = PREV-0
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-4
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 9 (order.o_orderkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (l_orderkey = o_orderkey)
|
||||
TCN = 15 (lineitem.l_orderkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 10 (order.o_orderdate)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
??? filter o_orderdate < '1995-01-01' from previous stack
|
||||
??? filter l_shipdate > '1995-01-01' from previous stack
|
||||
GetColumnRowsByOffset
|
||||
TCN = 15 (l_orderkey)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
TCN = 10 (o_orderdate)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
|
||||
|
||||
|
||||
|
||||
-- $ID$
|
||||
-- TPC-H/TPC-R Shipping Priority Query (Q3)
|
||||
-- Functional Query Definition
|
||||
-- Approved February 1998
|
||||
:x
|
||||
:o
|
||||
select
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
c_mktsegment = ':1'
|
||||
and c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate < date ':2'
|
||||
and l_shipdate > date ':2'
|
||||
group by
|
||||
l_orderkey,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
order by
|
||||
revenue desc,
|
||||
o_orderdate;
|
||||
:n 10
|
||||
|
||||
select
|
||||
l_orderkey,
|
||||
o_orderdate
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
c_mktsegment = 'AUTOMOBILE'
|
||||
and c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate < '1995-01-01'
|
||||
and l_shipdate > '1995-01-01'
|
||||
|
||||
GetTokensByCompare
|
||||
DDN = ?
|
||||
BOP = EQ
|
||||
Arg32 = 'AUTOMOBILE'
|
||||
COP32 = AND
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (c_mktsegment = 'AUTOMOBILE')
|
||||
TCN = 1 (customer.c_mktsegment)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 2 (customer.c_custkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (c_custkey = o_custkey)
|
||||
TCN = 8 (orders.o_custkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FiterResultStacksByColumn
|
||||
RSP1 = PREV-2
|
||||
RSP2 = PREV-0
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-4
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 9 (order.o_orderkey)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
GetColumnRowsByIndexCompare (l_orderkey = o_orderkey)
|
||||
TCN = 15 (lineitem.l_orderkey)
|
||||
SCN = 1
|
||||
BOP = OR
|
||||
Arg32 = PREV-0
|
||||
COP32 = EQ
|
||||
RRI = 1
|
||||
FilterResultStacksByRID
|
||||
RSP1 = PREV-3
|
||||
RSP2 = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
SCN = 1
|
||||
TCN = 10 (order.o_orderdate)
|
||||
RSPwRID = PREV-0
|
||||
SendStackToArg32
|
||||
RSP = PREV-0
|
||||
??? filter o_orderdate < '1995-01-01' from previous stack
|
||||
??? filter l_shipdate > '1995-01-01' from previous stack
|
||||
GetColumnRowsByOffset
|
||||
TCN = 15 (l_orderkey)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
GetColumnRowsByOffset
|
||||
TCN = 10 (o_orderdate)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,49 +1,49 @@
|
||||
-- $ID$
|
||||
-- TPC-H/TPC-R Order Priority Checking Query (Q4)
|
||||
-- Functional Query Definition
|
||||
-- Approved February 1998
|
||||
:x
|
||||
:o
|
||||
select
|
||||
o_orderpriority,
|
||||
count(*) as order_count
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_orderdate >= date ':1'
|
||||
and o_orderdate < date ':1' + interval '3' month
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_orderkey = o_orderkey
|
||||
and l_commitdate < l_receiptdate
|
||||
)
|
||||
group by
|
||||
o_orderpriority
|
||||
order by
|
||||
o_orderpriority;
|
||||
:n -1
|
||||
|
||||
select
|
||||
o_orderpriority,
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_orderdate >= date ':1'
|
||||
and o_orderdate < date ':1' + interval '3' month
|
||||
|
||||
GetColumnRowsByFTSCompare
|
||||
TCN = 1 (o_orderdate)
|
||||
SCN = 1
|
||||
BOP = AND
|
||||
Arg32 = date ':1', date ':1' + interval '3' month
|
||||
COP32 = GTE, LE
|
||||
RRI = 1
|
||||
GetColumnRowsByOffset
|
||||
TCN = 2 (o_orderpriority)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
-- $ID$
|
||||
-- TPC-H/TPC-R Order Priority Checking Query (Q4)
|
||||
-- Functional Query Definition
|
||||
-- Approved February 1998
|
||||
:x
|
||||
:o
|
||||
select
|
||||
o_orderpriority,
|
||||
count(*) as order_count
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_orderdate >= date ':1'
|
||||
and o_orderdate < date ':1' + interval '3' month
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_orderkey = o_orderkey
|
||||
and l_commitdate < l_receiptdate
|
||||
)
|
||||
group by
|
||||
o_orderpriority
|
||||
order by
|
||||
o_orderpriority;
|
||||
:n -1
|
||||
|
||||
select
|
||||
o_orderpriority,
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_orderdate >= date ':1'
|
||||
and o_orderdate < date ':1' + interval '3' month
|
||||
|
||||
GetColumnRowsByFTSCompare
|
||||
TCN = 1 (o_orderdate)
|
||||
SCN = 1
|
||||
BOP = AND
|
||||
Arg32 = date ':1', date ':1' + interval '3' month
|
||||
COP32 = GTE, LE
|
||||
RRI = 1
|
||||
GetColumnRowsByOffset
|
||||
TCN = 2 (o_orderpriority)
|
||||
SCN = 1
|
||||
RSPwRID = PREV-0
|
||||
|
@ -1,233 +1,233 @@
|
||||
conn sys/qalpont!@<SID> as sysdba
|
||||
|
||||
create user TE identified by TE;
|
||||
create user S_TE identified by TE;
|
||||
create user TE_stage identified by TE;
|
||||
|
||||
grant connect, resource, select any table to S_TE;
|
||||
grant connect, resource, select any table to TE;
|
||||
grant connect, resource, select any table to TE_stage;
|
||||
|
||||
conn calpont/calpont@<SID>
|
||||
EXECUTE pkg_calpont.cal_register_object_owner('TE', 'TE', TRUE);
|
||||
|
||||
|
||||
conn s_te/te@<SID>
|
||||
|
||||
CREATE TABLE D_Adfamily (
|
||||
Adfam_Nbr NUMBER,
|
||||
Adfam_Nm VARCHAR2(256) NOT NULL,
|
||||
Dflt_Ind CHAR(1) NOT NULL ,
|
||||
Measured CHAR(1) NOT NULL ,
|
||||
Processtype CHAR(1) NOT NULL
|
||||
-- ,CONSTRAINT PK_D_ADFAMILY PRIMARY KEY (Adfam_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Campaign (
|
||||
Cmpgn_Nbr NUMBER NOT NULL,
|
||||
Cmpgn_Nm VARCHAR2(256) NOT NULL,
|
||||
Prod_Nbr NUMBER NOT NULL,
|
||||
Prod_Nm VARCHAR2(256) NOT NULL,
|
||||
Adv_Nbr NUMBER NOT NULL,
|
||||
Adv_Nm VARCHAR2(256) NOT NULL,
|
||||
Cust_Nbr NUMBER NOT NULL,
|
||||
Cust_Nm VARCHAR2(256) NOT NULL,
|
||||
Org_Nbr NUMBER NOT NULL,
|
||||
Org_Nm VARCHAR2(256) NOT NULL,
|
||||
TYPE CHAR(1) NOT NULL ,
|
||||
Start_Date DATE,
|
||||
End_Date DATE,
|
||||
Status CHAR(1) NOT NULL ,
|
||||
Keyword CHAR(1) NOT NULL ,
|
||||
Processreach NUMBER NOT NULL,
|
||||
Fixed_Cost NUMBER
|
||||
-- ,CONSTRAINT PK_D_CAMPAIGN PRIMARY KEY (Cmpgn_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Creative (
|
||||
CreativeID NUMBER NOT NULL,
|
||||
PathName VARCHAR2(110) NOT NULL,
|
||||
Crtv_Alias_Nbr VARCHAR2(70) NOT NULL
|
||||
--,CONSTRAINT PK_D_Creative PRIMARY KEY (CreativeID)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Event (
|
||||
Evnt_Nbr NUMBER,
|
||||
Site_Nbr NUMBER NOT NULL,
|
||||
Evnt_Grp_Nbr NUMBER NOT NULL,
|
||||
Pg_Desc VARCHAR2(256) NOT NULL,
|
||||
Evnt_Grp_Nm VARCHAR2(256) NOT NULL
|
||||
--,CONSTRAINT PK_D_Event PRIMARY KEY (Evnt_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Hour (
|
||||
Hr_Nbr NUMBER NOT NULL,
|
||||
Hr_Nm VARCHAR2(256) NOT NULL,
|
||||
Hr_Dt TIMESTAMP NOT NULL,
|
||||
Hod_Nbr NUMBER NOT NULL,
|
||||
Day_Nbr NUMBER NOT NULL,
|
||||
Day_Nm VARCHAR2(256) NOT NULL,
|
||||
Dow_Nbr NUMBER NOT NULL,
|
||||
Dow_Nm VARCHAR2(256) NOT NULL,
|
||||
Mnth_Nm VARCHAR2(256) NOT NULL,
|
||||
Mnth_Nbr NUMBER NOT NULL,
|
||||
Qtr_Nbr NUMBER NOT NULL,
|
||||
Qtr_Nm VARCHAR2(256) NOT NULL,
|
||||
Wk_Nbr NUMBER NOT NULL,
|
||||
Wk_Nm VARCHAR2(256) NOT NULL,
|
||||
Yr_Nbr NUMBER NOT NULL,
|
||||
Hod_Nm VARCHAR2(256) NOT NULL
|
||||
--,CONSTRAINT PK_D_HOUR PRIMARY KEY (Hr_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Package (
|
||||
Pkg_Nbr NUMBER,
|
||||
Pkg_Nm VARCHAR2(256) NOT NULL
|
||||
--,CONSTRAINT PK_D_Package PRIMARY KEY (Pkg_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Product_Buy (
|
||||
Product_Buy_Nbr NUMBER NOT NULL,
|
||||
Product_Buy_Nm VARCHAR2(24) NOT NULL,
|
||||
Mediaredirect NUMBER NOT NULL,
|
||||
Cookies NUMBER NOT NULL,
|
||||
Product_Buy_Typ CHAR(1),
|
||||
Behavior CHAR(1),
|
||||
Redirect VARCHAR2(256),
|
||||
Price NUMBER(10,4),
|
||||
Plan_Vol NUMBER,
|
||||
Units CHAR(3) NOT NULL
|
||||
--,CONSTRAINT PK_D_PRODUCT_BUY PRIMARY KEY (Product_Buy_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Site (
|
||||
Site_Nbr NUMBER NOT NULL,
|
||||
Site_Nm VARCHAR2(256) NOT NULL,
|
||||
Org_Nbr NUMBER NOT NULL,
|
||||
Publisher_Id NUMBER NOT NULL,
|
||||
Publisher_Name VARCHAR2(256) NOT NULL
|
||||
--,CONSTRAINT PK_D_SITE PRIMARY KEY (Site_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Campaign_SiteMeasure (
|
||||
Cmpgn_Nbr NUMBER NOT NULL,
|
||||
SiteMeasure_Nbr number NOT NULL
|
||||
--,CONSTRAINT PK_D_CAMPAIGN_SITE_MSR PRIMARY KEY (Cmpgn_Nbr, SiteMeasure_Nbr )
|
||||
);
|
||||
|
||||
CREATE TABLE Customer_spacedesc (
|
||||
Cust_Nbr NUMBER NOT NULL,
|
||||
SPACEDESC VARCHAR2(256) NOT NULL,
|
||||
CMPGN_NBR NUMBER,
|
||||
ENDDATE NUMBER,
|
||||
ADNET_NBR NUMBER,
|
||||
FIRST_FLAG CHAR(1));
|
||||
|
||||
|
||||
|
||||
CREATE TABLE Tag (
|
||||
Tag_Key NUMBER NOT NULL,
|
||||
Tag_Name Varchar2(256) NOT NULL,
|
||||
Tag_Value Varchar2(256) NOT NULL
|
||||
--,CONSTRAINT PK_TAG PRIMARY KEY (Tag_Key)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE Tag_Trans (
|
||||
Tag_Key NUMBER NOT NULL,
|
||||
Log_Key NUMBER NOT NULL
|
||||
--,CONSTRAINT PK_TAG_TRANS PRIMARY KEY (Tag_Key)
|
||||
);
|
||||
|
||||
conn sys/qalpont!@<SID> as sysdba
|
||||
|
||||
create user TE identified by TE;
|
||||
create user S_TE identified by TE;
|
||||
create user TE_stage identified by TE;
|
||||
|
||||
grant connect, resource, select any table to S_TE;
|
||||
grant connect, resource, select any table to TE;
|
||||
grant connect, resource, select any table to TE_stage;
|
||||
|
||||
conn calpont/calpont@<SID>
|
||||
EXECUTE pkg_calpont.cal_register_object_owner('TE', 'TE', TRUE);
|
||||
|
||||
|
||||
conn s_te/te@<SID>
|
||||
|
||||
CREATE TABLE D_Adfamily (
|
||||
Adfam_Nbr NUMBER,
|
||||
Adfam_Nm VARCHAR2(256) NOT NULL,
|
||||
Dflt_Ind CHAR(1) NOT NULL ,
|
||||
Measured CHAR(1) NOT NULL ,
|
||||
Processtype CHAR(1) NOT NULL
|
||||
-- ,CONSTRAINT PK_D_ADFAMILY PRIMARY KEY (Adfam_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Campaign (
|
||||
Cmpgn_Nbr NUMBER NOT NULL,
|
||||
Cmpgn_Nm VARCHAR2(256) NOT NULL,
|
||||
Prod_Nbr NUMBER NOT NULL,
|
||||
Prod_Nm VARCHAR2(256) NOT NULL,
|
||||
Adv_Nbr NUMBER NOT NULL,
|
||||
Adv_Nm VARCHAR2(256) NOT NULL,
|
||||
Cust_Nbr NUMBER NOT NULL,
|
||||
Cust_Nm VARCHAR2(256) NOT NULL,
|
||||
Org_Nbr NUMBER NOT NULL,
|
||||
Org_Nm VARCHAR2(256) NOT NULL,
|
||||
TYPE CHAR(1) NOT NULL ,
|
||||
Start_Date DATE,
|
||||
End_Date DATE,
|
||||
Status CHAR(1) NOT NULL ,
|
||||
Keyword CHAR(1) NOT NULL ,
|
||||
Processreach NUMBER NOT NULL,
|
||||
Fixed_Cost NUMBER
|
||||
-- ,CONSTRAINT PK_D_CAMPAIGN PRIMARY KEY (Cmpgn_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Creative (
|
||||
CreativeID NUMBER NOT NULL,
|
||||
PathName VARCHAR2(110) NOT NULL,
|
||||
Crtv_Alias_Nbr VARCHAR2(70) NOT NULL
|
||||
--,CONSTRAINT PK_D_Creative PRIMARY KEY (CreativeID)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Event (
|
||||
Evnt_Nbr NUMBER,
|
||||
Site_Nbr NUMBER NOT NULL,
|
||||
Evnt_Grp_Nbr NUMBER NOT NULL,
|
||||
Pg_Desc VARCHAR2(256) NOT NULL,
|
||||
Evnt_Grp_Nm VARCHAR2(256) NOT NULL
|
||||
--,CONSTRAINT PK_D_Event PRIMARY KEY (Evnt_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Hour (
|
||||
Hr_Nbr NUMBER NOT NULL,
|
||||
Hr_Nm VARCHAR2(256) NOT NULL,
|
||||
Hr_Dt TIMESTAMP NOT NULL,
|
||||
Hod_Nbr NUMBER NOT NULL,
|
||||
Day_Nbr NUMBER NOT NULL,
|
||||
Day_Nm VARCHAR2(256) NOT NULL,
|
||||
Dow_Nbr NUMBER NOT NULL,
|
||||
Dow_Nm VARCHAR2(256) NOT NULL,
|
||||
Mnth_Nm VARCHAR2(256) NOT NULL,
|
||||
Mnth_Nbr NUMBER NOT NULL,
|
||||
Qtr_Nbr NUMBER NOT NULL,
|
||||
Qtr_Nm VARCHAR2(256) NOT NULL,
|
||||
Wk_Nbr NUMBER NOT NULL,
|
||||
Wk_Nm VARCHAR2(256) NOT NULL,
|
||||
Yr_Nbr NUMBER NOT NULL,
|
||||
Hod_Nm VARCHAR2(256) NOT NULL
|
||||
--,CONSTRAINT PK_D_HOUR PRIMARY KEY (Hr_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Package (
|
||||
Pkg_Nbr NUMBER,
|
||||
Pkg_Nm VARCHAR2(256) NOT NULL
|
||||
--,CONSTRAINT PK_D_Package PRIMARY KEY (Pkg_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Product_Buy (
|
||||
Product_Buy_Nbr NUMBER NOT NULL,
|
||||
Product_Buy_Nm VARCHAR2(24) NOT NULL,
|
||||
Mediaredirect NUMBER NOT NULL,
|
||||
Cookies NUMBER NOT NULL,
|
||||
Product_Buy_Typ CHAR(1),
|
||||
Behavior CHAR(1),
|
||||
Redirect VARCHAR2(256),
|
||||
Price NUMBER(10,4),
|
||||
Plan_Vol NUMBER,
|
||||
Units CHAR(3) NOT NULL
|
||||
--,CONSTRAINT PK_D_PRODUCT_BUY PRIMARY KEY (Product_Buy_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Site (
|
||||
Site_Nbr NUMBER NOT NULL,
|
||||
Site_Nm VARCHAR2(256) NOT NULL,
|
||||
Org_Nbr NUMBER NOT NULL,
|
||||
Publisher_Id NUMBER NOT NULL,
|
||||
Publisher_Name VARCHAR2(256) NOT NULL
|
||||
--,CONSTRAINT PK_D_SITE PRIMARY KEY (Site_Nbr)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE D_Campaign_SiteMeasure (
|
||||
Cmpgn_Nbr NUMBER NOT NULL,
|
||||
SiteMeasure_Nbr number NOT NULL
|
||||
--,CONSTRAINT PK_D_CAMPAIGN_SITE_MSR PRIMARY KEY (Cmpgn_Nbr, SiteMeasure_Nbr )
|
||||
);
|
||||
|
||||
CREATE TABLE Customer_spacedesc (
|
||||
Cust_Nbr NUMBER NOT NULL,
|
||||
SPACEDESC VARCHAR2(256) NOT NULL,
|
||||
CMPGN_NBR NUMBER,
|
||||
ENDDATE NUMBER,
|
||||
ADNET_NBR NUMBER,
|
||||
FIRST_FLAG CHAR(1));
|
||||
|
||||
|
||||
|
||||
CREATE TABLE Tag (
|
||||
Tag_Key NUMBER NOT NULL,
|
||||
Tag_Name Varchar2(256) NOT NULL,
|
||||
Tag_Value Varchar2(256) NOT NULL
|
||||
--,CONSTRAINT PK_TAG PRIMARY KEY (Tag_Key)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE Tag_Trans (
|
||||
Tag_Key NUMBER NOT NULL,
|
||||
Log_Key NUMBER NOT NULL
|
||||
--,CONSTRAINT PK_TAG_TRANS PRIMARY KEY (Tag_Key)
|
||||
);
|
||||
|
||||
CREATE TABLE D_DayParts (
|
||||
Type VARCHAR2(3),
|
||||
Type_Desc VARCHAR2(50),
|
||||
HOD_Nbr NUMBER,
|
||||
DOW_Nbr NUMBER
|
||||
DOW_Nbr NUMBER
|
||||
--,CONSTRAINT PK_D_DayParts PRIMARY KEY (Type, Type_Desc, HOD_Nbr, DOW_Nbr)
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
CREATE TABLE D_GeoTarget (
|
||||
Oct1 VARCHAR2(80),
|
||||
State CHAR(2),
|
||||
Msa VARCHAR2(17)
|
||||
Msa VARCHAR2(17)
|
||||
--,CONSTRAINT PK_D_GeoTarget PRIMARY KEY (Oct1, State, Msa)
|
||||
);
|
||||
|
||||
CREATE TABLE Tag_Names (
|
||||
Tag_Id NUMBER(8,0),
|
||||
Tag_Name VARCHAR2(40) CONSTRAINT NN_Tag_Names_Name NOT NULL,
|
||||
Tag_Value VARCHAR2(40) CONSTRAINT NN_Tag_Values_Value NOT NULL
|
||||
--, CONSTRAINT PK_Tag_Names PRIMARY KEY (Tag_Id)
|
||||
);
|
||||
|
||||
CREATE TABLE Tag_Values (
|
||||
Log_Key NUMBER,
|
||||
Tag_Id NUMBER(8,0)
|
||||
--,CONSTRAINT PK_Tag_Values PRIMARY KEY (Log_Key, Tag_Id)
|
||||
);
|
||||
|
||||
|
||||
drop table f_trans;
|
||||
|
||||
CREATE TABLE f_Trans (
|
||||
Log_Key Number,
|
||||
Prim_Cookie Number ,
|
||||
Prim_Cookie_Flag Char(1),
|
||||
Trans_Typ Char(1),
|
||||
Remote_IP Varchar2(15),
|
||||
dest_url varchar2(4000),
|
||||
Trans_Time Number(9,6) ,
|
||||
Content_Length Number(4),
|
||||
Trans_Timestamp_source timestamp,
|
||||
Http_Status Number(3),
|
||||
Campaign_nbr_source Number(7),
|
||||
Site_nbr Number(7),
|
||||
Creative_Width Number(4),
|
||||
Creative_Height Number(4),
|
||||
Site_Section_ID Number(7),
|
||||
Creative_Group_ID Number(7),
|
||||
overrides Varchar2(4000),
|
||||
Server_Diagnostic Char(1) ,
|
||||
Creative_Path varchar2(400),
|
||||
Ad_Family_ID_source number(7),
|
||||
Prim_Cookie_Domain number(9),
|
||||
Server_ID Number(3),
|
||||
Request_Subtype Char(2),
|
||||
CreativeID number(9) ,
|
||||
Product_Buy_ID Number(7),
|
||||
TimeStamp_Correction timestamp,
|
||||
Kwd_Details Varchar2(10),
|
||||
Target_Details Varchar2(20),
|
||||
Speed_Select Varchar2(10),
|
||||
SSL_Enabled Varchar2(3),
|
||||
Digital_Signature Varchar2(40),
|
||||
Grp_Value Varchar2(400),
|
||||
Evnt_Value Varchar2(400),
|
||||
Evnt_ID Number(7),
|
||||
Cmpgn_nbr Number(7),
|
||||
record_Timestamp timestamp,
|
||||
adfam_nbr number,
|
||||
Revenue number,
|
||||
pkg_nbr Varchar(200),
|
||||
Fraud_Flag char(1),
|
||||
Ping_type char(1),
|
||||
Ping_type_Log_Key Number
|
||||
) ;
|
||||
|
||||
|
||||
conn te_Stage/te@<SID>
|
||||
|
||||
drop sequence te_stage.seq_f_trans;
|
||||
create sequence te_stage.seq_f_trans start with 1 cache 100;
|
||||
grant select on te_stage.seq_f_trans to public;
|
||||
|
||||
|
||||
);
|
||||
|
||||
CREATE TABLE Tag_Names (
|
||||
Tag_Id NUMBER(8,0),
|
||||
Tag_Name VARCHAR2(40) CONSTRAINT NN_Tag_Names_Name NOT NULL,
|
||||
Tag_Value VARCHAR2(40) CONSTRAINT NN_Tag_Values_Value NOT NULL
|
||||
--, CONSTRAINT PK_Tag_Names PRIMARY KEY (Tag_Id)
|
||||
);
|
||||
|
||||
CREATE TABLE Tag_Values (
|
||||
Log_Key NUMBER,
|
||||
Tag_Id NUMBER(8,0)
|
||||
--,CONSTRAINT PK_Tag_Values PRIMARY KEY (Log_Key, Tag_Id)
|
||||
);
|
||||
|
||||
|
||||
drop table f_trans;
|
||||
|
||||
CREATE TABLE f_Trans (
|
||||
Log_Key Number,
|
||||
Prim_Cookie Number ,
|
||||
Prim_Cookie_Flag Char(1),
|
||||
Trans_Typ Char(1),
|
||||
Remote_IP Varchar2(15),
|
||||
dest_url varchar2(4000),
|
||||
Trans_Time Number(9,6) ,
|
||||
Content_Length Number(4),
|
||||
Trans_Timestamp_source timestamp,
|
||||
Http_Status Number(3),
|
||||
Campaign_nbr_source Number(7),
|
||||
Site_nbr Number(7),
|
||||
Creative_Width Number(4),
|
||||
Creative_Height Number(4),
|
||||
Site_Section_ID Number(7),
|
||||
Creative_Group_ID Number(7),
|
||||
overrides Varchar2(4000),
|
||||
Server_Diagnostic Char(1) ,
|
||||
Creative_Path varchar2(400),
|
||||
Ad_Family_ID_source number(7),
|
||||
Prim_Cookie_Domain number(9),
|
||||
Server_ID Number(3),
|
||||
Request_Subtype Char(2),
|
||||
CreativeID number(9) ,
|
||||
Product_Buy_ID Number(7),
|
||||
TimeStamp_Correction timestamp,
|
||||
Kwd_Details Varchar2(10),
|
||||
Target_Details Varchar2(20),
|
||||
Speed_Select Varchar2(10),
|
||||
SSL_Enabled Varchar2(3),
|
||||
Digital_Signature Varchar2(40),
|
||||
Grp_Value Varchar2(400),
|
||||
Evnt_Value Varchar2(400),
|
||||
Evnt_ID Number(7),
|
||||
Cmpgn_nbr Number(7),
|
||||
record_Timestamp timestamp,
|
||||
adfam_nbr number,
|
||||
Revenue number,
|
||||
pkg_nbr Varchar(200),
|
||||
Fraud_Flag char(1),
|
||||
Ping_type char(1),
|
||||
Ping_type_Log_Key Number
|
||||
) ;
|
||||
|
||||
|
||||
conn te_Stage/te@<SID>
|
||||
|
||||
drop sequence te_stage.seq_f_trans;
|
||||
create sequence te_stage.seq_f_trans start with 1 cache 100;
|
||||
grant select on te_stage.seq_f_trans to public;
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Demo 1
|
||||
select l_shipdate from lineitem where l_quantity = 1 and l_discount = 0;
|
||||
|
||||
select l_shipdate from lineitem where l_quantity = 1 and l_discount = 0;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
||||
Operation: table access
|
||||
|
@ -1,10 +1,10 @@
|
||||
Demo 2
|
||||
select l_partkey from lineitem
|
||||
where l_quantity = 5
|
||||
and l_discount = 0
|
||||
and l_linestatus = 'F'
|
||||
and l_returnflag = 'N';
|
||||
|
||||
select l_partkey from lineitem
|
||||
where l_quantity = 5
|
||||
and l_discount = 0
|
||||
and l_linestatus = 'F'
|
||||
and l_returnflag = 'N';
|
||||
|
||||
Oracle Execution Plan
|
||||
|
||||
Operation: table access
|
||||
|
@ -1,11 +1,11 @@
|
||||
Demo 3a
|
||||
select sum(l_extendedprice * l_discount) as revenue
|
||||
from lineitem
|
||||
where l_shipdate >= TO_DATE('1994-01-01', 'YYYY-MM-DD')
|
||||
and l_shipdate < TO_DATE('1994-01-01', 'YYYY-MM-DD') + NUMTOYMINTERVAL(1,'year')
|
||||
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
|
||||
and l_quantity < 24;
|
||||
|
||||
select sum(l_extendedprice * l_discount) as revenue
|
||||
from lineitem
|
||||
where l_shipdate >= TO_DATE('1994-01-01', 'YYYY-MM-DD')
|
||||
and l_shipdate < TO_DATE('1994-01-01', 'YYYY-MM-DD') + NUMTOYMINTERVAL(1,'year')
|
||||
and l_discount between 0.06 - 0.01 and 0.06 + 0.01
|
||||
and l_quantity < 24;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
||||
Operation: table access
|
||||
|
@ -1,11 +1,11 @@
|
||||
Demo 3b
|
||||
select l_extendedprice, l_discount
|
||||
from lineitem
|
||||
where l_shipdate >= to_date('1993-01-01','yyyy-mm-dd')
|
||||
and l_shipdate < to_date('1994-01-01','yyyy-mm-dd')
|
||||
and l_discount between 0.05 and 0.07
|
||||
and l_quantity < 24;
|
||||
|
||||
select l_extendedprice, l_discount
|
||||
from lineitem
|
||||
where l_shipdate >= to_date('1993-01-01','yyyy-mm-dd')
|
||||
and l_shipdate < to_date('1994-01-01','yyyy-mm-dd')
|
||||
and l_discount between 0.05 and 0.07
|
||||
and l_quantity < 24;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
||||
Operation: table access
|
||||
|
@ -1,14 +1,14 @@
|
||||
Demo4
|
||||
Select to_char(o_orderdate,'YYYY'),
|
||||
sum(l_quantity) qty_sold
|
||||
from part,
|
||||
orders,
|
||||
lineitem
|
||||
where p_partkey = l_partkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate between TO_DATE('1995-01-01', 'YYYY-MM-DD')
|
||||
and TO_DATE('1995-01-31', 'YYYY-MM-DD')
|
||||
and p_type = 'ECONOMY ANODIZED STEEL'
|
||||
Select to_char(o_orderdate,'YYYY'),
|
||||
sum(l_quantity) qty_sold
|
||||
from part,
|
||||
orders,
|
||||
lineitem
|
||||
where p_partkey = l_partkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate between TO_DATE('1995-01-01', 'YYYY-MM-DD')
|
||||
and TO_DATE('1995-01-31', 'YYYY-MM-DD')
|
||||
and p_type = 'ECONOMY ANODIZED STEEL'
|
||||
group by to_char(o_orderdate,'YYYY');
|
||||
|
||||
Oracle Execution Plan
|
||||
|
@ -1,241 +1,241 @@
|
||||
--- Q11 Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$1
|
||||
Extended_information: FP:N_NAME=':1'
|
||||
Access_predicates:
|
||||
Filter_predicates: N_NAME=':1'
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$2
|
||||
Extended_information: FP:N_NAME=':1'
|
||||
Access_predicates:
|
||||
Filter_predicates: N_NAME=':1'
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST, N_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST, N_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_AVAILQTY, PS_SUPPLYCOST
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:PS_SUPPKEY=S_SUPPKEY AND S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: PS_SUPPKEY=S_SUPPKEY&S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_AVAILQTY, PS_SUPPLYCOST
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:PS_SUPPKEY=S_SUPPKEY AND S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: PS_SUPPKEY=S_SUPPKEY&S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, SUM(PS_SUPPLYCOST*PS_AVAILQTY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: AGGREGATE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: SUM(PS_SUPPLYCOST*PS_AVAILQTY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: filter
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, SUM(PS_SUPPLYCOST*PS_AVAILQTY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: FP:SUM(PS_SUPPLYCOST*PS_AVAILQTY)> (SELECT SUM(PS_SUPPLYCOST*PS_AVAILQTY)*2 FROM NATION NATION,SUPPLIER SUPPLIER,PARTSUPP PARTSUPP WHERE S_NATIONKEY=N_NATIONKEY AND PS_SUPPKEY=S_SUPPKEY AND N_NAME=':1')
|
||||
Access_predicates:
|
||||
Filter_predicates: SUM(PS_SUPPLYCOST*PS_AVAILQTY)> (SELECT SUM(PS_SUPPLYCOST*PS_AVAILQTY)*2 FROM NATION NATION,SUPPLIER SUPPLIER,PARTSUPP PARTSUPP WHERE S_NATIONKEY=N_NATIONKEY&PS_SUPPKEY=S_SUPPKEY&N_NAME=':1')
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: SUM(PS_SUPPLYCOST*PS_AVAILQTY), PS_PARTKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
---- END ------
|
||||
--- Q11 Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$1
|
||||
Extended_information: FP:N_NAME=':1'
|
||||
Access_predicates:
|
||||
Filter_predicates: N_NAME=':1'
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$2
|
||||
Extended_information: FP:N_NAME=':1'
|
||||
Access_predicates:
|
||||
Filter_predicates: N_NAME=':1'
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST, N_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY, PS_AVAILQTY, PS_SUPPLYCOST, N_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_AVAILQTY, PS_SUPPLYCOST
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:PS_SUPPKEY=S_SUPPKEY AND S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: PS_SUPPKEY=S_SUPPKEY&S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_AVAILQTY, PS_SUPPLYCOST
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:PS_SUPPKEY=S_SUPPKEY AND S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: PS_SUPPKEY=S_SUPPKEY&S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, SUM(PS_SUPPLYCOST*PS_AVAILQTY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: AGGREGATE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: SUM(PS_SUPPLYCOST*PS_AVAILQTY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: filter
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, SUM(PS_SUPPLYCOST*PS_AVAILQTY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: FP:SUM(PS_SUPPLYCOST*PS_AVAILQTY)> (SELECT SUM(PS_SUPPLYCOST*PS_AVAILQTY)*2 FROM NATION NATION,SUPPLIER SUPPLIER,PARTSUPP PARTSUPP WHERE S_NATIONKEY=N_NATIONKEY AND PS_SUPPKEY=S_SUPPKEY AND N_NAME=':1')
|
||||
Access_predicates:
|
||||
Filter_predicates: SUM(PS_SUPPLYCOST*PS_AVAILQTY)> (SELECT SUM(PS_SUPPLYCOST*PS_AVAILQTY)*2 FROM NATION NATION,SUPPLIER SUPPLIER,PARTSUPP PARTSUPP WHERE S_NATIONKEY=N_NATIONKEY&PS_SUPPKEY=S_SUPPKEY&N_NAME=':1')
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: SUM(PS_SUPPLYCOST*PS_AVAILQTY), PS_PARTKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
---- END ------
|
||||
|
@ -16,7 +16,7 @@ where
|
||||
group by
|
||||
l_shipmode
|
||||
order by
|
||||
l_shipmode;
|
||||
l_shipmode;
|
||||
|
||||
|
||||
Oracle Execution Plan
|
||||
|
@ -1,137 +1,137 @@
|
||||
select
|
||||
c_count,
|
||||
count(*) as custdist
|
||||
from
|
||||
(
|
||||
select
|
||||
c_custkey,
|
||||
count(o_orderkey) c_count
|
||||
from
|
||||
customer left outer join orders on
|
||||
c_custkey = o_custkey
|
||||
and o_comment not like '%:1%:2%'
|
||||
group by
|
||||
c_custkey
|
||||
) c_orders
|
||||
group by
|
||||
c_count
|
||||
order by
|
||||
custdist desc,
|
||||
c_count desc
|
||||
/
|
||||
|
||||
-- Q13 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$3
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$54D64B3C
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: ORDERS.O_ORDERKEY, O_CUSTKEY
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$2
|
||||
Extended_information: FP:O_COMMENT(+) NOT LIKE '%:1%:2%'
|
||||
Access_predicates:
|
||||
Filter_predicates: O_COMMENT(+) NOT LIKE '%:1%:2%'
|
||||
Select_level: SEL$54D64B3C
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: OUTER
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, ORDERS.O_ORDERKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:C_CUSTKEY=O_CUSTKEY(+)
|
||||
Access_predicates: C_CUSTKEY=O_CUSTKEY(+)
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: CUSTOMER.C_CUSTKEY, COUNT(ORDERS.O_ORDERKEY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$54D64B3C
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_COUNT
|
||||
Object_name:
|
||||
Alias: C_ORDERS@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$54D64B3C
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_COUNT, COUNT(ALL)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: COUNT(ALL), INTERNAL_FUNCTION(C_COUNT)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
select
|
||||
c_count,
|
||||
count(*) as custdist
|
||||
from
|
||||
(
|
||||
select
|
||||
c_custkey,
|
||||
count(o_orderkey) c_count
|
||||
from
|
||||
customer left outer join orders on
|
||||
c_custkey = o_custkey
|
||||
and o_comment not like '%:1%:2%'
|
||||
group by
|
||||
c_custkey
|
||||
) c_orders
|
||||
group by
|
||||
c_count
|
||||
order by
|
||||
custdist desc,
|
||||
c_count desc
|
||||
/
|
||||
|
||||
-- Q13 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$3
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$54D64B3C
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: ORDERS.O_ORDERKEY, O_CUSTKEY
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$2
|
||||
Extended_information: FP:O_COMMENT(+) NOT LIKE '%:1%:2%'
|
||||
Access_predicates:
|
||||
Filter_predicates: O_COMMENT(+) NOT LIKE '%:1%:2%'
|
||||
Select_level: SEL$54D64B3C
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: OUTER
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, ORDERS.O_ORDERKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:C_CUSTKEY=O_CUSTKEY(+)
|
||||
Access_predicates: C_CUSTKEY=O_CUSTKEY(+)
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: CUSTOMER.C_CUSTKEY, COUNT(ORDERS.O_ORDERKEY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$54D64B3C
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_COUNT
|
||||
Object_name:
|
||||
Alias: C_ORDERS@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$54D64B3C
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_COUNT, COUNT(ALL)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: COUNT(ALL), INTERNAL_FUNCTION(C_COUNT)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
|
@ -7,7 +7,7 @@ from
|
||||
where
|
||||
l_partkey = p_partkey
|
||||
and l_shipdate >= date '1995-09-01'
|
||||
and l_shipdate < date '1995-09-01' + interval '1' month;
|
||||
and l_shipdate < date '1995-09-01' + interval '1' month;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
||||
|
@ -27,121 +27,121 @@ order by
|
||||
supplier_cnt desc,
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size;
|
||||
|
||||
-- Q16 Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, P_BRAND, P_TYPE, P_SIZE
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$1
|
||||
Extended_information: FP:(P_SIZE=3 OR P_SIZE=4 OR P_SIZE=5 OR P_SIZE=6 OR P_SIZE=7 OR P_SIZE=8 OR P_SIZE=9 OR P_SIZE=10) AND P_BRAND<>':1' AND P_TYPE NOT LIKE ':2%'
|
||||
Access_predicates:
|
||||
Filter_predicates: (P_SIZE=3|P_SIZE=4|P_SIZE=5|P_SIZE=6|P_SIZE=7|P_SIZE=8|P_SIZE=9|P_SIZE=10)&P_BRAND<>':1'&P_TYPE NOT LIKE ':2%'
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY, P_SIZE, P_BRAND, P_TYPE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:P_PARTKEY=PS_PARTKEY
|
||||
Access_predicates: P_PARTKEY=PS_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_COMMENT
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information: FP:S_COMMENT LIKE '%Customer%Complaints%' AND LNNVL(S_SUPPKEY<>:B1)
|
||||
Access_predicates:
|
||||
Filter_predicates: S_COMMENT LIKE '%Customer%Complaints%'&LNNVL(S_SUPPKEY<>:B1)
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: filter
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY, P_SIZE, P_BRAND, P_TYPE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: FP: NOT EXISTS (SELECT /*+ */ 0 FROM SUPPLIER SUPPLIER WHERE S_COMMENT LIKE '%Customer%Complaints%' AND LNNVL(S_SUPPKEY<>:B1))
|
||||
Access_predicates:
|
||||
Filter_predicates: NOT EXISTS (SELECT /*+ */ 0 FROM SUPPLIER SUPPLIER WHERE S_COMMENT LIKE '%Customer%Complaints%'&LNNVL(S_SUPPKEY<>:B1))
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: P_BRAND, P_TYPE, P_SIZE, COUNT(DISTINCT PS_SUPPKEY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: COUNT(DISTINCT PS_SUPPKEY), P_BRAND, P_TYPE, P_SIZE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
--- END -------
|
||||
|
||||
p_size;
|
||||
|
||||
-- Q16 Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, P_BRAND, P_TYPE, P_SIZE
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$1
|
||||
Extended_information: FP:(P_SIZE=3 OR P_SIZE=4 OR P_SIZE=5 OR P_SIZE=6 OR P_SIZE=7 OR P_SIZE=8 OR P_SIZE=9 OR P_SIZE=10) AND P_BRAND<>':1' AND P_TYPE NOT LIKE ':2%'
|
||||
Access_predicates:
|
||||
Filter_predicates: (P_SIZE=3|P_SIZE=4|P_SIZE=5|P_SIZE=6|P_SIZE=7|P_SIZE=8|P_SIZE=9|P_SIZE=10)&P_BRAND<>':1'&P_TYPE NOT LIKE ':2%'
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY, P_SIZE, P_BRAND, P_TYPE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:P_PARTKEY=PS_PARTKEY
|
||||
Access_predicates: P_PARTKEY=PS_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_COMMENT
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information: FP:S_COMMENT LIKE '%Customer%Complaints%' AND LNNVL(S_SUPPKEY<>:B1)
|
||||
Access_predicates:
|
||||
Filter_predicates: S_COMMENT LIKE '%Customer%Complaints%'&LNNVL(S_SUPPKEY<>:B1)
|
||||
Select_level: SEL$2
|
||||
--------------------
|
||||
Operation: filter
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY, P_SIZE, P_BRAND, P_TYPE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: FP: NOT EXISTS (SELECT /*+ */ 0 FROM SUPPLIER SUPPLIER WHERE S_COMMENT LIKE '%Customer%Complaints%' AND LNNVL(S_SUPPKEY<>:B1))
|
||||
Access_predicates:
|
||||
Filter_predicates: NOT EXISTS (SELECT /*+ */ 0 FROM SUPPLIER SUPPLIER WHERE S_COMMENT LIKE '%Customer%Complaints%'&LNNVL(S_SUPPKEY<>:B1))
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: P_BRAND, P_TYPE, P_SIZE, COUNT(DISTINCT PS_SUPPKEY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: COUNT(DISTINCT PS_SUPPKEY), P_BRAND, P_TYPE, P_SIZE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
--- END -------
|
||||
|
||||
|
@ -28,7 +28,7 @@ order by
|
||||
supplier_cnt desc,
|
||||
p_brand,
|
||||
p_type,
|
||||
p_size;
|
||||
p_size;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
||||
|
@ -14,142 +14,142 @@ where
|
||||
lineitem
|
||||
where
|
||||
l_partkey = p_partkey
|
||||
);
|
||||
|
||||
-- Q17 Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, P_BRAND, P_CONTAINER
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$1
|
||||
Extended_information: FP:P_CONTAINER=':2' AND P_BRAND=':1'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_CONTAINER=':2'&P_BRAND=':1'
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_PARTKEY, L_QUANTITY, L_EXTENDEDPRICE
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, L_PARTKEY, P_CONTAINER, P_BRAND, L_EXTENDEDPRICE, L_QUANTITY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:P_PARTKEY=L_PARTKEY
|
||||
Access_predicates: P_PARTKEY=L_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: window
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_PARTKEY, P_PARTKEY, L_QUANTITY, P_CONTAINER, P_BRAND, L_EXTENDEDPRICE, AVG(L_QUANTITY) OVER ( PARTITION BY L_PARTKEY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type: VIEW
|
||||
Other:
|
||||
Object_owner: SYS
|
||||
Search_columns:
|
||||
Projection: L_EXTENDEDPRICE
|
||||
Object_name:
|
||||
Alias: VW_WIF_1@SEL$D99A5D2D
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: AGGREGATE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: SUM(L_EXTENDEDPRICE)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$C15DFC48
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
|
||||
>SELECT MAIN
|
||||
>>Returned Columns
|
||||
ArithmeticColumn: AggregateColumn sum(L_EXTENDEDPRICE)
|
||||
ArithmeticColumn: SimpleColumn L_EXTENDEDPRICE
|
||||
s/t/c/T/A: ///0/
|
||||
|
||||
|
||||
|
||||
>>Filters
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.PART.P_CONTAINER
|
||||
s/t/c/T/A: tpch/PART/P_CONTAINER/52/PART
|
||||
Operator: = ConstantColumn: :2(l)
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.PART.P_BRAND
|
||||
s/t/c/T/A: tpch/PART/P_BRAND/49/PART
|
||||
Operator: = ConstantColumn: :1(l)
|
||||
Operator: AND
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.PART.P_PARTKEY
|
||||
s/t/c/T/A: tpch/PART/P_PARTKEY/46/PART
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_PARTKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_PARTKEY/26/LINEITEM
|
||||
|
||||
Operator: and
|
||||
>>Group By Columns
|
||||
ArithmeticColumn: AggregateColumn sum(L_EXTENDEDPRICE)
|
||||
ArithmeticColumn: SimpleColumn L_EXTENDEDPRICE
|
||||
s/t/c/T/A: ///0/
|
||||
|
||||
|
||||
|
||||
SessionID: 2881
|
||||
TxnID: 70
|
||||
VerID: 70
|
||||
|
||||
);
|
||||
|
||||
-- Q17 Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, P_BRAND, P_CONTAINER
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$1
|
||||
Extended_information: FP:P_CONTAINER=':2' AND P_BRAND=':1'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_CONTAINER=':2'&P_BRAND=':1'
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_PARTKEY, L_QUANTITY, L_EXTENDEDPRICE
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, L_PARTKEY, P_CONTAINER, P_BRAND, L_EXTENDEDPRICE, L_QUANTITY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:P_PARTKEY=L_PARTKEY
|
||||
Access_predicates: P_PARTKEY=L_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: window
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_PARTKEY, P_PARTKEY, L_QUANTITY, P_CONTAINER, P_BRAND, L_EXTENDEDPRICE, AVG(L_QUANTITY) OVER ( PARTITION BY L_PARTKEY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type: VIEW
|
||||
Other:
|
||||
Object_owner: SYS
|
||||
Search_columns:
|
||||
Projection: L_EXTENDEDPRICE
|
||||
Object_name:
|
||||
Alias: VW_WIF_1@SEL$D99A5D2D
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: AGGREGATE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: SUM(L_EXTENDEDPRICE)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$C15DFC48
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
|
||||
>SELECT MAIN
|
||||
>>Returned Columns
|
||||
ArithmeticColumn: AggregateColumn sum(L_EXTENDEDPRICE)
|
||||
ArithmeticColumn: SimpleColumn L_EXTENDEDPRICE
|
||||
s/t/c/T/A: ///0/
|
||||
|
||||
|
||||
|
||||
>>Filters
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.PART.P_CONTAINER
|
||||
s/t/c/T/A: tpch/PART/P_CONTAINER/52/PART
|
||||
Operator: = ConstantColumn: :2(l)
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.PART.P_BRAND
|
||||
s/t/c/T/A: tpch/PART/P_BRAND/49/PART
|
||||
Operator: = ConstantColumn: :1(l)
|
||||
Operator: AND
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.PART.P_PARTKEY
|
||||
s/t/c/T/A: tpch/PART/P_PARTKEY/46/PART
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_PARTKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_PARTKEY/26/LINEITEM
|
||||
|
||||
Operator: and
|
||||
>>Group By Columns
|
||||
ArithmeticColumn: AggregateColumn sum(L_EXTENDEDPRICE)
|
||||
ArithmeticColumn: SimpleColumn L_EXTENDEDPRICE
|
||||
s/t/c/T/A: ///0/
|
||||
|
||||
|
||||
|
||||
SessionID: 2881
|
||||
TxnID: 70
|
||||
VerID: 70
|
||||
|
||||
|
@ -29,189 +29,189 @@ group by
|
||||
o_totalprice
|
||||
order by
|
||||
o_totalprice desc,
|
||||
o_orderdate;
|
||||
|
||||
-- Q18 Plan Start --
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_QUANTITY
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$5DA710D3
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_QUANTITY
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$683B0107
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_NAME
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$5DA710D3
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_QUANTITY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, SUM(L_QUANTITY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_NAME, L_ORDERKEY, L_QUANTITY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, O_CUSTKEY, O_TOTALPRICE, O_ORDERDATE
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$5DA710D3
|
||||
--------------------
|
||||
Operation: filter
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: FP:SUM(L_QUANTITY)>1
|
||||
Access_predicates:
|
||||
Filter_predicates: SUM(L_QUANTITY)>1
|
||||
Select_level: SEL$683B0107
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, O_ORDERKEY, L_QUANTITY, C_NAME, O_TOTALPRICE, O_ORDERDATE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:C_CUSTKEY=O_CUSTKEY AND O_ORDERKEY=L_ORDERKEY
|
||||
Access_predicates: C_CUSTKEY=O_CUSTKEY&O_ORDERKEY=L_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type: VIEW
|
||||
Other:
|
||||
Object_owner: SYS
|
||||
Search_columns:
|
||||
Projection: $nso_col_1
|
||||
Object_name:
|
||||
Alias: VW_NSO_1@SEL$5DA710D3
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$683B0107
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: SEMI
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, C_CUSTKEY, O_ORDERDATE, L_QUANTITY, C_NAME, O_TOTALPRICE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_ORDERKEY=$nso_col_1
|
||||
Access_predicates: O_ORDERKEY=$nso_col_1
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: INTERNAL_FUNCTION(O_TOTALPRICE), O_ORDERDATE, O_ORDERKEY, C_CUSTKEY, C_NAME, SUM(L_QUANTITY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$5DA710D3
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
o_orderdate;
|
||||
|
||||
-- Q18 Plan Start --
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_QUANTITY
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$5DA710D3
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_QUANTITY
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$683B0107
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_NAME
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$5DA710D3
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_QUANTITY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, SUM(L_QUANTITY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_NAME, L_ORDERKEY, L_QUANTITY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, O_CUSTKEY, O_TOTALPRICE, O_ORDERDATE
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$5DA710D3
|
||||
--------------------
|
||||
Operation: filter
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: FP:SUM(L_QUANTITY)>1
|
||||
Access_predicates:
|
||||
Filter_predicates: SUM(L_QUANTITY)>1
|
||||
Select_level: SEL$683B0107
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, O_ORDERKEY, L_QUANTITY, C_NAME, O_TOTALPRICE, O_ORDERDATE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:C_CUSTKEY=O_CUSTKEY AND O_ORDERKEY=L_ORDERKEY
|
||||
Access_predicates: C_CUSTKEY=O_CUSTKEY&O_ORDERKEY=L_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type: VIEW
|
||||
Other:
|
||||
Object_owner: SYS
|
||||
Search_columns:
|
||||
Projection: $nso_col_1
|
||||
Object_name:
|
||||
Alias: VW_NSO_1@SEL$5DA710D3
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$683B0107
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: SEMI
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, C_CUSTKEY, O_ORDERDATE, L_QUANTITY, C_NAME, O_TOTALPRICE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_ORDERKEY=$nso_col_1
|
||||
Access_predicates: O_ORDERKEY=$nso_col_1
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: INTERNAL_FUNCTION(O_TOTALPRICE), O_ORDERDATE, O_ORDERKEY, C_CUSTKEY, C_NAME, SUM(L_QUANTITY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$5DA710D3
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
|
@ -34,217 +34,217 @@ where
|
||||
and s_nationkey = n_nationkey
|
||||
and n_name = ':3'
|
||||
order by
|
||||
s_name;
|
||||
|
||||
-- Q20 Plan Start --
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$3
|
||||
Extended_information: FP:P_NAME LIKE ':1%'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_NAME LIKE ':1%'
|
||||
Select_level: SEL$0A417DA5
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY, PS_AVAILQTY
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$0A417DA5
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_QUANTITY
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$4
|
||||
Extended_information: FP:L_SHIPDATE>=TO_DATE('1998-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_SHIPDATE<TO_DATE('1999-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_PARTKEY=:B1 AND L_SUPPKEY=:B2
|
||||
Access_predicates:
|
||||
Filter_predicates: L_SHIPDATE>=TO_DATE('1998-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_SHIPDATE<TO_DATE('1999-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_PARTKEY=:B1&L_SUPPKEY=:B2
|
||||
Select_level: SEL$4
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_AVAILQTY, PS_SUPPKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:PS_PARTKEY=P_PARTKEY
|
||||
Access_predicates: PS_PARTKEY=P_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: AGGREGATE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: SUM(L_QUANTITY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$4
|
||||
--------------------
|
||||
Operation: filter
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: FP:PS_AVAILQTY> (SELECT 0.5*SUM(L_QUANTITY) FROM LINEITEM LINEITEM WHERE L_SHIPDATE>=TO_DATE('1998-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_SHIPDATE<TO_DATE('1999-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_PARTKEY=:B1 AND L_SUPPKEY=:B2)
|
||||
Access_predicates:
|
||||
Filter_predicates: PS_AVAILQTY> (SELECT 0.5*SUM(L_QUANTITY) FROM LINEITEM LINEITEM WHERE L_SHIPDATE>=TO_DATE('1998-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_SHIPDATE<TO_DATE('1999-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_PARTKEY=:B1&L_SUPPKEY=:B2)
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: UNIQUE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$0A417DA5
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type: VIEW
|
||||
Other:
|
||||
Object_owner: SYS
|
||||
Search_columns:
|
||||
Projection: $nso_col_1
|
||||
Object_name:
|
||||
Alias: VW_NSO_1@SEL$032ACE5F
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$0A417DA5
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$1
|
||||
Extended_information: FP:N_NAME=':3'
|
||||
Access_predicates:
|
||||
Filter_predicates: N_NAME=':3'
|
||||
Select_level: SEL$032ACE5F
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: $nso_col_1
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY, $nso_col_1
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$032ACE5F
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_ADDRESS, S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=$nso_col_1 AND S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: S_SUPPKEY=$nso_col_1&S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NAME, S_ADDRESS
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$032ACE5F
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
s_name;
|
||||
|
||||
-- Q20 Plan Start --
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$3
|
||||
Extended_information: FP:P_NAME LIKE ':1%'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_NAME LIKE ':1%'
|
||||
Select_level: SEL$0A417DA5
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY, PS_AVAILQTY
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$0A417DA5
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_QUANTITY
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$4
|
||||
Extended_information: FP:L_SHIPDATE>=TO_DATE('1998-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_SHIPDATE<TO_DATE('1999-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_PARTKEY=:B1 AND L_SUPPKEY=:B2
|
||||
Access_predicates:
|
||||
Filter_predicates: L_SHIPDATE>=TO_DATE('1998-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_SHIPDATE<TO_DATE('1999-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_PARTKEY=:B1&L_SUPPKEY=:B2
|
||||
Select_level: SEL$4
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_AVAILQTY, PS_SUPPKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:PS_PARTKEY=P_PARTKEY
|
||||
Access_predicates: PS_PARTKEY=P_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: AGGREGATE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: SUM(L_QUANTITY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$4
|
||||
--------------------
|
||||
Operation: filter
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: FP:PS_AVAILQTY> (SELECT 0.5*SUM(L_QUANTITY) FROM LINEITEM LINEITEM WHERE L_SHIPDATE>=TO_DATE('1998-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_SHIPDATE<TO_DATE('1999-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_PARTKEY=:B1 AND L_SUPPKEY=:B2)
|
||||
Access_predicates:
|
||||
Filter_predicates: PS_AVAILQTY> (SELECT 0.5*SUM(L_QUANTITY) FROM LINEITEM LINEITEM WHERE L_SHIPDATE>=TO_DATE('1998-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_SHIPDATE<TO_DATE('1999-12-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_PARTKEY=:B1&L_SUPPKEY=:B2)
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: UNIQUE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_SUPPKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$0A417DA5
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type: VIEW
|
||||
Other:
|
||||
Object_owner: SYS
|
||||
Search_columns:
|
||||
Projection: $nso_col_1
|
||||
Object_name:
|
||||
Alias: VW_NSO_1@SEL$032ACE5F
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$0A417DA5
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$1
|
||||
Extended_information: FP:N_NAME=':3'
|
||||
Access_predicates:
|
||||
Filter_predicates: N_NAME=':3'
|
||||
Select_level: SEL$032ACE5F
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: $nso_col_1
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY, $nso_col_1
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$032ACE5F
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_ADDRESS, S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=$nso_col_1 AND S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: S_SUPPKEY=$nso_col_1&S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NAME, S_ADDRESS
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$032ACE5F
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
|
@ -36,452 +36,452 @@ group by
|
||||
s_name
|
||||
order by
|
||||
numwait desc,
|
||||
s_name;
|
||||
|
||||
-- Q21 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L1.L_ORDERKEY, L1.L_SUPPKEY
|
||||
Object_name: LINEITEM
|
||||
Alias: L1@SEL$1
|
||||
Extended_information: FP:L1.L_RECEIPTDATE>L1.L_COMMITDATE
|
||||
Access_predicates:
|
||||
Filter_predicates: L1.L_RECEIPTDATE>L1.L_COMMITDATE
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L1.L_SUPPKEY, S_NATIONKEY, S_NAME, L1.L_ORDERKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=L1.L_SUPPKEY
|
||||
Access_predicates: S_SUPPKEY=L1.L_SUPPKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$1
|
||||
Extended_information: FP:O_ORDERSTATUS='F'
|
||||
Access_predicates:
|
||||
Filter_predicates: O_ORDERSTATUS='F'
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L1.L_ORDERKEY, L1.L_SUPPKEY, S_NATIONKEY, S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_ORDERKEY=L1.L_ORDERKEY
|
||||
Access_predicates: O_ORDERKEY=L1.L_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$1
|
||||
Extended_information: FP:N_NAME=':1'
|
||||
Access_predicates:
|
||||
Filter_predicates: N_NAME=':1'
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L1.L_ORDERKEY, L1.L_SUPPKEY, S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L3.L_ORDERKEY, L3.L_SUPPKEY
|
||||
Object_name: LINEITEM
|
||||
Alias: L3@SEL$3
|
||||
Extended_information: FP:L3.L_RECEIPTDATE>L3.L_COMMITDATE
|
||||
Access_predicates:
|
||||
Filter_predicates: L3.L_RECEIPTDATE>L3.L_COMMITDATE
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: ANTI
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L1.L_ORDERKEY, L1.L_SUPPKEY, S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:L3.L_ORDERKEY=L1.L_ORDERKEY FP:L3.L_SUPPKEY<>L1.L_SUPPKEY
|
||||
Access_predicates: L3.L_ORDERKEY=L1.L_ORDERKEY
|
||||
Filter_predicates: L3.L_SUPPKEY<>L1.L_SUPPKEY
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L2.L_ORDERKEY, L2.L_SUPPKEY
|
||||
Object_name: LINEITEM
|
||||
Alias: L2@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: SEMI
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:L2.L_ORDERKEY=L1.L_ORDERKEY FP:L2.L_SUPPKEY<>L1.L_SUPPKEY
|
||||
Access_predicates: L2.L_ORDERKEY=L1.L_ORDERKEY
|
||||
Filter_predicates: L2.L_SUPPKEY<>L1.L_SUPPKEY
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NAME, COUNT(ALL)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: COUNT(ALL), S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
|
||||
TOKEN: <L1.L_RECEIPTDATE>L1.L_COMMITDATE>
|
||||
LEFT: L1.L_RECEIPTDATE
|
||||
TOKEN: <S_SUPPKEY=L1.L_SUPPKEY>
|
||||
LEFT: S_SUPPKEY
|
||||
TOKEN: <O_ORDERSTATUS='F'>
|
||||
LEFT: O_ORDERSTATUS
|
||||
TOKEN: <O_ORDERKEY=L1.L_ORDERKEY>
|
||||
LEFT: O_ORDERKEY
|
||||
TOKEN: <N_NAME=':1'>
|
||||
LEFT: N_NAME
|
||||
TOKEN: <S_NATIONKEY=N_NATIONKEY>
|
||||
LEFT: S_NATIONKEY
|
||||
TOKEN: <L3.L_RECEIPTDATE>L3.L_COMMITDATE>
|
||||
LEFT: L3.L_RECEIPTDATE
|
||||
TOKEN: <L3.L_ORDERKEY=L1.L_ORDERKEY>
|
||||
LEFT: L3.L_ORDERKEY
|
||||
TOKEN: <L3.L_SUPPKEY<>L1.L_SUPPKEY>
|
||||
LEFT: L3.L_SUPPKEY
|
||||
TOKEN: <L2.L_ORDERKEY=L1.L_ORDERKEY>
|
||||
LEFT: L2.L_ORDERKEY
|
||||
TOKEN: <L2.L_SUPPKEY<>L1.L_SUPPKEY>
|
||||
LEFT: L2.L_SUPPKEY
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_RECEIPTDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_RECEIPTDATE/37/L1
|
||||
Operator: > SimpleColumn tpch.LINEITEM.L_COMMITDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_COMMITDATE/36/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.SUPPLIER.S_SUPPKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_SUPPKEY/55/SUPPLIER
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.ORDERS.O_ORDERSTATUS
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERSTATUS/18/
|
||||
Operator: = ConstantColumn: F(l)
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.ORDERS.O_ORDERKEY
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERKEY/16/ORDERS
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.NATION.N_NAME
|
||||
s/t/c/T/A: tpch/NATION/N_NAME/5/
|
||||
Operator: = ConstantColumn: :1(l)
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.SUPPLIER.S_NATIONKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NATIONKEY/58/SUPPLIER
|
||||
Operator: = SimpleColumn tpch.NATION.N_NATIONKEY
|
||||
s/t/c/T/A: tpch/NATION/N_NATIONKEY/4/NATION
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_RECEIPTDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_RECEIPTDATE/37/L3
|
||||
Operator: > SimpleColumn tpch.LINEITEM.L_COMMITDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_COMMITDATE/36/L3
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L3
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L3
|
||||
Operator: <> SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L2
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L2
|
||||
Operator: <> SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: )
|
||||
L_ORDERKEY: SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
L_ORDERKEY: SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L3
|
||||
|
||||
L_ORDERKEY: SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L2
|
||||
|
||||
L_SUPPKEY: SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
L_SUPPKEY: SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L3
|
||||
|
||||
L_SUPPKEY: SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L2
|
||||
|
||||
N_NATIONKEY: SimpleColumn tpch.NATION.N_NATIONKEY
|
||||
s/t/c/T/A: tpch/NATION/N_NATIONKEY/4/NATION
|
||||
|
||||
O_ORDERKEY: SimpleColumn tpch.ORDERS.O_ORDERKEY
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERKEY/16/ORDERS
|
||||
|
||||
S_NAME: SimpleColumn tpch.SUPPLIER.S_NAME
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NAME/56/SUPPLIER
|
||||
|
||||
S_NATIONKEY: SimpleColumn tpch.SUPPLIER.S_NATIONKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NATIONKEY/58/SUPPLIER
|
||||
|
||||
S_SUPPKEY: SimpleColumn tpch.SUPPLIER.S_SUPPKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_SUPPKEY/55/SUPPLIER
|
||||
|
||||
>SELECT MAIN
|
||||
>>Returned Columns
|
||||
ArithmeticColumn: AggregateColumn count(ALL)
|
||||
ArithmeticColumn: SimpleColumn ALL
|
||||
s/t/c/T/A: ///0/
|
||||
|
||||
|
||||
|
||||
SimpleColumn tpch.SUPPLIER.S_NAME
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NAME/56/SUPPLIER
|
||||
|
||||
>>Filters
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_RECEIPTDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_RECEIPTDATE/37/L1
|
||||
Operator: > SimpleColumn tpch.LINEITEM.L_COMMITDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_COMMITDATE/36/L1
|
||||
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.SUPPLIER.S_SUPPKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_SUPPKEY/55/SUPPLIER
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.ORDERS.O_ORDERSTATUS
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERSTATUS/18/
|
||||
Operator: = ConstantColumn: F(l)
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.ORDERS.O_ORDERKEY
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERKEY/16/ORDERS
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.NATION.N_NAME
|
||||
s/t/c/T/A: tpch/NATION/N_NAME/5/
|
||||
Operator: = ConstantColumn: :1(l)
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.SUPPLIER.S_NATIONKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NATIONKEY/58/SUPPLIER
|
||||
Operator: = SimpleColumn tpch.NATION.N_NATIONKEY
|
||||
s/t/c/T/A: tpch/NATION/N_NATIONKEY/4/NATION
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_RECEIPTDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_RECEIPTDATE/37/L3
|
||||
Operator: > SimpleColumn tpch.LINEITEM.L_COMMITDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_COMMITDATE/36/L3
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L3
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L3
|
||||
Operator: <> SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L2
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L2
|
||||
Operator: <> SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: and
|
||||
>>Group By Columns
|
||||
ArithmeticColumn: AggregateColumn count(ALL)
|
||||
ArithmeticColumn: SimpleColumn ALL
|
||||
s/t/c/T/A: ///0/
|
||||
|
||||
|
||||
|
||||
SimpleColumn tpch.SUPPLIER.S_NAME
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NAME/56/SUPPLIER
|
||||
|
||||
SessionID: 2935
|
||||
TxnID: 104
|
||||
VerID: 104
|
||||
|
||||
s_name;
|
||||
|
||||
-- Q21 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L1.L_ORDERKEY, L1.L_SUPPKEY
|
||||
Object_name: LINEITEM
|
||||
Alias: L1@SEL$1
|
||||
Extended_information: FP:L1.L_RECEIPTDATE>L1.L_COMMITDATE
|
||||
Access_predicates:
|
||||
Filter_predicates: L1.L_RECEIPTDATE>L1.L_COMMITDATE
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L1.L_SUPPKEY, S_NATIONKEY, S_NAME, L1.L_ORDERKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=L1.L_SUPPKEY
|
||||
Access_predicates: S_SUPPKEY=L1.L_SUPPKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$1
|
||||
Extended_information: FP:O_ORDERSTATUS='F'
|
||||
Access_predicates:
|
||||
Filter_predicates: O_ORDERSTATUS='F'
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L1.L_ORDERKEY, L1.L_SUPPKEY, S_NATIONKEY, S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_ORDERKEY=L1.L_ORDERKEY
|
||||
Access_predicates: O_ORDERKEY=L1.L_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$1
|
||||
Extended_information: FP:N_NAME=':1'
|
||||
Access_predicates:
|
||||
Filter_predicates: N_NAME=':1'
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L1.L_ORDERKEY, L1.L_SUPPKEY, S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L3.L_ORDERKEY, L3.L_SUPPKEY
|
||||
Object_name: LINEITEM
|
||||
Alias: L3@SEL$3
|
||||
Extended_information: FP:L3.L_RECEIPTDATE>L3.L_COMMITDATE
|
||||
Access_predicates:
|
||||
Filter_predicates: L3.L_RECEIPTDATE>L3.L_COMMITDATE
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: ANTI
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L1.L_ORDERKEY, L1.L_SUPPKEY, S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:L3.L_ORDERKEY=L1.L_ORDERKEY FP:L3.L_SUPPKEY<>L1.L_SUPPKEY
|
||||
Access_predicates: L3.L_ORDERKEY=L1.L_ORDERKEY
|
||||
Filter_predicates: L3.L_SUPPKEY<>L1.L_SUPPKEY
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L2.L_ORDERKEY, L2.L_SUPPKEY
|
||||
Object_name: LINEITEM
|
||||
Alias: L2@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: SEMI
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:L2.L_ORDERKEY=L1.L_ORDERKEY FP:L2.L_SUPPKEY<>L1.L_SUPPKEY
|
||||
Access_predicates: L2.L_ORDERKEY=L1.L_ORDERKEY
|
||||
Filter_predicates: L2.L_SUPPKEY<>L1.L_SUPPKEY
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: hash
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NAME, COUNT(ALL)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: COUNT(ALL), S_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$CC7EC59E
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
|
||||
TOKEN: <L1.L_RECEIPTDATE>L1.L_COMMITDATE>
|
||||
LEFT: L1.L_RECEIPTDATE
|
||||
TOKEN: <S_SUPPKEY=L1.L_SUPPKEY>
|
||||
LEFT: S_SUPPKEY
|
||||
TOKEN: <O_ORDERSTATUS='F'>
|
||||
LEFT: O_ORDERSTATUS
|
||||
TOKEN: <O_ORDERKEY=L1.L_ORDERKEY>
|
||||
LEFT: O_ORDERKEY
|
||||
TOKEN: <N_NAME=':1'>
|
||||
LEFT: N_NAME
|
||||
TOKEN: <S_NATIONKEY=N_NATIONKEY>
|
||||
LEFT: S_NATIONKEY
|
||||
TOKEN: <L3.L_RECEIPTDATE>L3.L_COMMITDATE>
|
||||
LEFT: L3.L_RECEIPTDATE
|
||||
TOKEN: <L3.L_ORDERKEY=L1.L_ORDERKEY>
|
||||
LEFT: L3.L_ORDERKEY
|
||||
TOKEN: <L3.L_SUPPKEY<>L1.L_SUPPKEY>
|
||||
LEFT: L3.L_SUPPKEY
|
||||
TOKEN: <L2.L_ORDERKEY=L1.L_ORDERKEY>
|
||||
LEFT: L2.L_ORDERKEY
|
||||
TOKEN: <L2.L_SUPPKEY<>L1.L_SUPPKEY>
|
||||
LEFT: L2.L_SUPPKEY
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_RECEIPTDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_RECEIPTDATE/37/L1
|
||||
Operator: > SimpleColumn tpch.LINEITEM.L_COMMITDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_COMMITDATE/36/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.SUPPLIER.S_SUPPKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_SUPPKEY/55/SUPPLIER
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.ORDERS.O_ORDERSTATUS
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERSTATUS/18/
|
||||
Operator: = ConstantColumn: F(l)
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.ORDERS.O_ORDERKEY
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERKEY/16/ORDERS
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.NATION.N_NAME
|
||||
s/t/c/T/A: tpch/NATION/N_NAME/5/
|
||||
Operator: = ConstantColumn: :1(l)
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.SUPPLIER.S_NATIONKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NATIONKEY/58/SUPPLIER
|
||||
Operator: = SimpleColumn tpch.NATION.N_NATIONKEY
|
||||
s/t/c/T/A: tpch/NATION/N_NATIONKEY/4/NATION
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_RECEIPTDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_RECEIPTDATE/37/L3
|
||||
Operator: > SimpleColumn tpch.LINEITEM.L_COMMITDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_COMMITDATE/36/L3
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L3
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L3
|
||||
Operator: <> SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L2
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: )
|
||||
Operator: and
|
||||
Operator: (
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L2
|
||||
Operator: <> SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: )
|
||||
L_ORDERKEY: SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
L_ORDERKEY: SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L3
|
||||
|
||||
L_ORDERKEY: SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L2
|
||||
|
||||
L_SUPPKEY: SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
L_SUPPKEY: SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L3
|
||||
|
||||
L_SUPPKEY: SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L2
|
||||
|
||||
N_NATIONKEY: SimpleColumn tpch.NATION.N_NATIONKEY
|
||||
s/t/c/T/A: tpch/NATION/N_NATIONKEY/4/NATION
|
||||
|
||||
O_ORDERKEY: SimpleColumn tpch.ORDERS.O_ORDERKEY
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERKEY/16/ORDERS
|
||||
|
||||
S_NAME: SimpleColumn tpch.SUPPLIER.S_NAME
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NAME/56/SUPPLIER
|
||||
|
||||
S_NATIONKEY: SimpleColumn tpch.SUPPLIER.S_NATIONKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NATIONKEY/58/SUPPLIER
|
||||
|
||||
S_SUPPKEY: SimpleColumn tpch.SUPPLIER.S_SUPPKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_SUPPKEY/55/SUPPLIER
|
||||
|
||||
>SELECT MAIN
|
||||
>>Returned Columns
|
||||
ArithmeticColumn: AggregateColumn count(ALL)
|
||||
ArithmeticColumn: SimpleColumn ALL
|
||||
s/t/c/T/A: ///0/
|
||||
|
||||
|
||||
|
||||
SimpleColumn tpch.SUPPLIER.S_NAME
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NAME/56/SUPPLIER
|
||||
|
||||
>>Filters
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_RECEIPTDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_RECEIPTDATE/37/L1
|
||||
Operator: > SimpleColumn tpch.LINEITEM.L_COMMITDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_COMMITDATE/36/L1
|
||||
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.SUPPLIER.S_SUPPKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_SUPPKEY/55/SUPPLIER
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.ORDERS.O_ORDERSTATUS
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERSTATUS/18/
|
||||
Operator: = ConstantColumn: F(l)
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.ORDERS.O_ORDERKEY
|
||||
s/t/c/T/A: tpch/ORDERS/O_ORDERKEY/16/ORDERS
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.NATION.N_NAME
|
||||
s/t/c/T/A: tpch/NATION/N_NAME/5/
|
||||
Operator: = ConstantColumn: :1(l)
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.SUPPLIER.S_NATIONKEY
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NATIONKEY/58/SUPPLIER
|
||||
Operator: = SimpleColumn tpch.NATION.N_NATIONKEY
|
||||
s/t/c/T/A: tpch/NATION/N_NATIONKEY/4/NATION
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_RECEIPTDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_RECEIPTDATE/37/L3
|
||||
Operator: > SimpleColumn tpch.LINEITEM.L_COMMITDATE
|
||||
s/t/c/T/A: tpch/LINEITEM/L_COMMITDATE/36/L3
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L3
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L3
|
||||
Operator: <> SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L2
|
||||
Operator: = SimpleColumn tpch.LINEITEM.L_ORDERKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_ORDERKEY/25/L1
|
||||
|
||||
Operator: and
|
||||
SimpleFilter
|
||||
SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L2
|
||||
Operator: <> SimpleColumn tpch.LINEITEM.L_SUPPKEY
|
||||
s/t/c/T/A: tpch/LINEITEM/L_SUPPKEY/27/L1
|
||||
|
||||
Operator: and
|
||||
>>Group By Columns
|
||||
ArithmeticColumn: AggregateColumn count(ALL)
|
||||
ArithmeticColumn: SimpleColumn ALL
|
||||
s/t/c/T/A: ///0/
|
||||
|
||||
|
||||
|
||||
SimpleColumn tpch.SUPPLIER.S_NAME
|
||||
s/t/c/T/A: tpch/SUPPLIER/S_NAME/56/SUPPLIER
|
||||
|
||||
SessionID: 2935
|
||||
TxnID: 104
|
||||
VerID: 104
|
||||
|
||||
|
@ -26,7 +26,7 @@ where
|
||||
group by
|
||||
substr(c_phone, 1, 2)
|
||||
order by
|
||||
cntrycode;
|
||||
cntrycode;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
||||
|
@ -1,139 +1,139 @@
|
||||
select
|
||||
cntrycode,
|
||||
count(*) as numcust,
|
||||
sum(c_acctbal) as totacctbal
|
||||
from
|
||||
(
|
||||
select
|
||||
c_phone as cntrycode,
|
||||
c_acctbal
|
||||
from
|
||||
customer
|
||||
where
|
||||
c_phone in
|
||||
(':1', ':2', ':3', ':4', ':5', ':6', ':7')
|
||||
and c_acctbal > (
|
||||
select
|
||||
avg(c_acctbal)
|
||||
from
|
||||
customer
|
||||
where
|
||||
c_acctbal > 0.00
|
||||
and c_phone in
|
||||
(':1', ':2', ':3', ':4', ':5', ':6', ':7')
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_custkey = c_custkey
|
||||
)
|
||||
) custsale
|
||||
group by
|
||||
cntrycode
|
||||
order by
|
||||
cntrycode
|
||||
/
|
||||
|
||||
-- Q22 Plan Start --
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_ACCTBAL
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$3
|
||||
Extended_information: FP:C_ACCTBAL>0.00 AND (C_PHONE=':1' OR C_PHONE=':2' OR C_PHONE=':3' OR C_PHONE=':4' OR C_PHONE=':5' OR C_PHONE=':6' OR C_PHONE=':7')
|
||||
Access_predicates:
|
||||
Filter_predicates: C_ACCTBAL>0.00&(C_PHONE=':1'|C_PHONE=':2'|C_PHONE=':3'|C_PHONE=':4'|C_PHONE=':5'|C_PHONE=':6'|C_PHONE=':7')
|
||||
Select_level: SEL$3
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: AGGREGATE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: AVG(C_ACCTBAL)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$3
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_PHONE, C_ACCTBAL
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$2
|
||||
Extended_information: FP:(C_PHONE=':1' OR C_PHONE=':2' OR C_PHONE=':3' OR C_PHONE=':4' OR C_PHONE=':5' OR C_PHONE=':6' OR C_PHONE=':7') AND C_ACCTBAL> (SELECT AVG(C_ACCTBAL) FROM CUSTOMER CUSTOMER WHERE C_ACCTBAL>0.00 AND (C_PHONE=':1' OR C_PHONE=':2' OR C_PHONE=':3' OR C_PHONE=':4' OR C_PHONE=':5' OR C_PHONE=':6' OR C_PHONE=':7'))
|
||||
Access_predicates:
|
||||
Filter_predicates: (C_PHONE=':1'|C_PHONE=':2'|C_PHONE=':3'|C_PHONE=':4'|C_PHONE=':5'|C_PHONE=':6'|C_PHONE=':7')&C_ACCTBAL> (SELECT AVG(C_ACCTBAL) FROM CUSTOMER CUSTOMER WHERE C_ACCTBAL>0.00&(C_PHONE=':1'|C_PHONE=':2'|C_PHONE=':3'|C_PHONE=':4'|C_PHONE=':5'|C_PHONE=':6'|C_PHONE=':7'))
|
||||
Select_level: SEL$6B5772FB
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_CUSTKEY
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$4
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$6B5772FB
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: ANTI
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_ACCTBAL, C_PHONE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_CUSTKEY=C_CUSTKEY
|
||||
Access_predicates: O_CUSTKEY=C_CUSTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_PHONE, COUNT(ALL), SUM(C_ACCTBAL)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$6B5772FB
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
select
|
||||
cntrycode,
|
||||
count(*) as numcust,
|
||||
sum(c_acctbal) as totacctbal
|
||||
from
|
||||
(
|
||||
select
|
||||
c_phone as cntrycode,
|
||||
c_acctbal
|
||||
from
|
||||
customer
|
||||
where
|
||||
c_phone in
|
||||
(':1', ':2', ':3', ':4', ':5', ':6', ':7')
|
||||
and c_acctbal > (
|
||||
select
|
||||
avg(c_acctbal)
|
||||
from
|
||||
customer
|
||||
where
|
||||
c_acctbal > 0.00
|
||||
and c_phone in
|
||||
(':1', ':2', ':3', ':4', ':5', ':6', ':7')
|
||||
)
|
||||
and not exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_custkey = c_custkey
|
||||
)
|
||||
) custsale
|
||||
group by
|
||||
cntrycode
|
||||
order by
|
||||
cntrycode
|
||||
/
|
||||
|
||||
-- Q22 Plan Start --
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_ACCTBAL
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$3
|
||||
Extended_information: FP:C_ACCTBAL>0.00 AND (C_PHONE=':1' OR C_PHONE=':2' OR C_PHONE=':3' OR C_PHONE=':4' OR C_PHONE=':5' OR C_PHONE=':6' OR C_PHONE=':7')
|
||||
Access_predicates:
|
||||
Filter_predicates: C_ACCTBAL>0.00&(C_PHONE=':1'|C_PHONE=':2'|C_PHONE=':3'|C_PHONE=':4'|C_PHONE=':5'|C_PHONE=':6'|C_PHONE=':7')
|
||||
Select_level: SEL$3
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: AGGREGATE
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: AVG(C_ACCTBAL)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$3
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_PHONE, C_ACCTBAL
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$2
|
||||
Extended_information: FP:(C_PHONE=':1' OR C_PHONE=':2' OR C_PHONE=':3' OR C_PHONE=':4' OR C_PHONE=':5' OR C_PHONE=':6' OR C_PHONE=':7') AND C_ACCTBAL> (SELECT AVG(C_ACCTBAL) FROM CUSTOMER CUSTOMER WHERE C_ACCTBAL>0.00 AND (C_PHONE=':1' OR C_PHONE=':2' OR C_PHONE=':3' OR C_PHONE=':4' OR C_PHONE=':5' OR C_PHONE=':6' OR C_PHONE=':7'))
|
||||
Access_predicates:
|
||||
Filter_predicates: (C_PHONE=':1'|C_PHONE=':2'|C_PHONE=':3'|C_PHONE=':4'|C_PHONE=':5'|C_PHONE=':6'|C_PHONE=':7')&C_ACCTBAL> (SELECT AVG(C_ACCTBAL) FROM CUSTOMER CUSTOMER WHERE C_ACCTBAL>0.00&(C_PHONE=':1'|C_PHONE=':2'|C_PHONE=':3'|C_PHONE=':4'|C_PHONE=':5'|C_PHONE=':6'|C_PHONE=':7'))
|
||||
Select_level: SEL$6B5772FB
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_CUSTKEY
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$4
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$6B5772FB
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options: ANTI
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_ACCTBAL, C_PHONE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_CUSTKEY=C_CUSTKEY
|
||||
Access_predicates: O_CUSTKEY=C_CUSTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: C_PHONE, COUNT(ALL), SUM(C_ACCTBAL)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$6B5772FB
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
|
@ -26,7 +26,7 @@ where
|
||||
group by
|
||||
substr(c_phone, 1, 2)
|
||||
order by
|
||||
cntrycode;
|
||||
cntrycode;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
||||
|
@ -1,257 +1,257 @@
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
p_partkey,
|
||||
p_mfgr,
|
||||
s_address,
|
||||
s_phone,
|
||||
s_comment
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_size = 1
|
||||
and p_type like '%a'
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'ASIA'
|
||||
and ps_supplycost = (
|
||||
select
|
||||
min(ps_supplycost)
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'ASIA')
|
||||
order by
|
||||
s_acctbal desc,
|
||||
n_name,
|
||||
s_name,
|
||||
p_partkey;
|
||||
|
||||
-- Q2 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, P_MFGR, P_TYPE, P_SIZE
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$1
|
||||
Extended_information: FP:P_SIZE=1 AND P_TYPE LIKE '%:2'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_SIZE=1&P_TYPE LIKE '%:2'
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY, S_PHONE, S_ACCTBAL, S_COMMENT
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, P_MFGR, P_TYPE, P_SIZE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: R_REGIONKEY, R_NAME
|
||||
Object_name: REGION
|
||||
Alias: REGION@SEL$1
|
||||
Extended_information: FP:R_NAME=':3'
|
||||
Access_predicates:
|
||||
Filter_predicates: R_NAME=':3'
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY, S_PHONE, S_ACCTBAL, S_COMMENT, P_PARTKEY, P_MFGR, P_TYPE, P_SIZE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: R_REGIONKEY, R_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY, S_PHONE, S_ACCTBAL, S_COMMENT, P_PARTKEY, P_MFGR, P_TYPE, P_SIZE, R_REGIONKEY, R_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY, N_NAME, N_REGIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: R_REGIONKEY, N_REGIONKEY, S_NATIONKEY, N_NATIONKEY, S_SUPPKEY, S_NAME, S_ADDRESS, R_NAME, S_PHONE, S_ACCTBAL, S_COMMENT, P_PARTKEY, P_MFGR, P_TYPE, P_SIZE, N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:N_REGIONKEY=R_REGIONKEY AND S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: N_REGIONKEY=R_REGIONKEY&S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: ROWID, PS_PARTKEY, PS_SUPPKEY, PS_SUPPLYCOST
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, PS_SUPPKEY, P_PARTKEY, PS_PARTKEY, R_REGIONKEY, N_REGIONKEY, S_NATIONKEY, N_NATIONKEY, N_NAME, S_NAME, S_ADDRESS, R_NAME, S_PHONE, S_ACCTBAL, S_COMMENT, P_SIZE, P_MFGR, P_TYPE, ROWID, PS_SUPPLYCOST
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=PS_SUPPKEY AND P_PARTKEY=PS_PARTKEY
|
||||
Access_predicates: S_SUPPKEY=PS_SUPPKEY&P_PARTKEY=PS_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: window
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, S_SUPPKEY, PS_SUPPKEY, P_PARTKEY, PS_SUPPLYCOST, R_REGIONKEY, N_REGIONKEY, S_NATIONKEY, N_NATIONKEY, N_NAME, S_NAME, S_ADDRESS, R_NAME, S_PHONE, S_ACCTBAL, S_COMMENT, P_SIZE, P_MFGR, P_TYPE, ROWID, MIN(PS_SUPPLYCOST) OVER ( PARTITION BY PS_PARTKEY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type: VIEW
|
||||
Other:
|
||||
Object_owner: SYS
|
||||
Search_columns:
|
||||
Projection: S_ACCTBAL, S_NAME, N_NAME, P_PARTKEY, P_MFGR, S_ADDRESS, S_PHONE, S_COMMENT, VW_COL_9
|
||||
Object_name:
|
||||
Alias: VW_WIF_1@SEL$76B8F26C
|
||||
Extended_information: FP:VW_COL_9 IS NOT NULL
|
||||
Access_predicates:
|
||||
Filter_predicates: VW_COL_9 IS NOT NULL
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: INTERNAL_FUNCTION(S_ACCTBAL), N_NAME, S_NAME, P_PARTKEY, S_COMMENT, S_ADDRESS, S_PHONE, P_MFGR
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$599F6CA1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- END --
|
||||
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
p_partkey,
|
||||
p_mfgr,
|
||||
s_address,
|
||||
s_phone,
|
||||
s_comment
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_size = 1
|
||||
and p_type like '%a'
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'ASIA'
|
||||
and ps_supplycost = (
|
||||
select
|
||||
min(ps_supplycost)
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = 'ASIA')
|
||||
order by
|
||||
s_acctbal desc,
|
||||
n_name,
|
||||
s_name,
|
||||
p_partkey;
|
||||
|
||||
-- Q2 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, P_MFGR, P_TYPE, P_SIZE
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$1
|
||||
Extended_information: FP:P_SIZE=1 AND P_TYPE LIKE '%:2'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_SIZE=1&P_TYPE LIKE '%:2'
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY, S_PHONE, S_ACCTBAL, S_COMMENT
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY, P_MFGR, P_TYPE, P_SIZE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: R_REGIONKEY, R_NAME
|
||||
Object_name: REGION
|
||||
Alias: REGION@SEL$1
|
||||
Extended_information: FP:R_NAME=':3'
|
||||
Access_predicates:
|
||||
Filter_predicates: R_NAME=':3'
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY, S_PHONE, S_ACCTBAL, S_COMMENT, P_PARTKEY, P_MFGR, P_TYPE, P_SIZE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: buffer
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: R_REGIONKEY, R_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: merge join
|
||||
Options: CARTESIAN
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NAME, S_ADDRESS, S_NATIONKEY, S_PHONE, S_ACCTBAL, S_COMMENT, P_PARTKEY, P_MFGR, P_TYPE, P_SIZE, R_REGIONKEY, R_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY, N_NAME, N_REGIONKEY
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: R_REGIONKEY, N_REGIONKEY, S_NATIONKEY, N_NATIONKEY, S_SUPPKEY, S_NAME, S_ADDRESS, R_NAME, S_PHONE, S_ACCTBAL, S_COMMENT, P_PARTKEY, P_MFGR, P_TYPE, P_SIZE, N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:N_REGIONKEY=R_REGIONKEY AND S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: N_REGIONKEY=R_REGIONKEY&S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: ROWID, PS_PARTKEY, PS_SUPPKEY, PS_SUPPLYCOST
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$1
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, PS_SUPPKEY, P_PARTKEY, PS_PARTKEY, R_REGIONKEY, N_REGIONKEY, S_NATIONKEY, N_NATIONKEY, N_NAME, S_NAME, S_ADDRESS, R_NAME, S_PHONE, S_ACCTBAL, S_COMMENT, P_SIZE, P_MFGR, P_TYPE, ROWID, PS_SUPPLYCOST
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=PS_SUPPKEY AND P_PARTKEY=PS_PARTKEY
|
||||
Access_predicates: S_SUPPKEY=PS_SUPPKEY&P_PARTKEY=PS_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: window
|
||||
Options: SORT
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, S_SUPPKEY, PS_SUPPKEY, P_PARTKEY, PS_SUPPLYCOST, R_REGIONKEY, N_REGIONKEY, S_NATIONKEY, N_NATIONKEY, N_NAME, S_NAME, S_ADDRESS, R_NAME, S_PHONE, S_ACCTBAL, S_COMMENT, P_SIZE, P_MFGR, P_TYPE, ROWID, MIN(PS_SUPPLYCOST) OVER ( PARTITION BY PS_PARTKEY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: view
|
||||
Options:
|
||||
Object_type: VIEW
|
||||
Other:
|
||||
Object_owner: SYS
|
||||
Search_columns:
|
||||
Projection: S_ACCTBAL, S_NAME, N_NAME, P_PARTKEY, P_MFGR, S_ADDRESS, S_PHONE, S_COMMENT, VW_COL_9
|
||||
Object_name:
|
||||
Alias: VW_WIF_1@SEL$76B8F26C
|
||||
Extended_information: FP:VW_COL_9 IS NOT NULL
|
||||
Access_predicates:
|
||||
Filter_predicates: VW_COL_9 IS NOT NULL
|
||||
Select_level: SEL$DD8D4BD4
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: ORDER BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: INTERNAL_FUNCTION(S_ACCTBAL), N_NAME, S_NAME, P_PARTKEY, S_COMMENT, S_ADDRESS, S_PHONE, P_MFGR
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$599F6CA1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- END --
|
||||
|
||||
|
@ -1,46 +1,46 @@
|
||||
Q2
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
p_partkey,
|
||||
p_mfgr,
|
||||
s_address,
|
||||
s_phone,
|
||||
s_comment
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_size = :1
|
||||
and p_type like '%:2'
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = ':3'
|
||||
and ps_supplycost = (
|
||||
select
|
||||
min(ps_supplycost)
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = ':3'
|
||||
)
|
||||
order by
|
||||
s_acctbal desc,
|
||||
n_name,
|
||||
s_name,
|
||||
select
|
||||
s_acctbal,
|
||||
s_name,
|
||||
n_name,
|
||||
p_partkey,
|
||||
p_mfgr,
|
||||
s_address,
|
||||
s_phone,
|
||||
s_comment
|
||||
from
|
||||
part,
|
||||
supplier,
|
||||
partsupp,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and p_size = :1
|
||||
and p_type like '%:2'
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = ':3'
|
||||
and ps_supplycost = (
|
||||
select
|
||||
min(ps_supplycost)
|
||||
from
|
||||
partsupp,
|
||||
supplier,
|
||||
nation,
|
||||
region
|
||||
where
|
||||
p_partkey = ps_partkey
|
||||
and s_suppkey = ps_suppkey
|
||||
and s_nationkey = n_nationkey
|
||||
and n_regionkey = r_regionkey
|
||||
and r_name = ':3'
|
||||
)
|
||||
order by
|
||||
s_acctbal desc,
|
||||
n_name,
|
||||
s_name,
|
||||
p_partkey;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
@ -1,25 +1,25 @@
|
||||
Q3
|
||||
select
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
c_mktsegment = 'BUILDING'
|
||||
and c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate < date '1995-03-15'
|
||||
and l_shipdate > date '1995-03-15'
|
||||
group by
|
||||
l_orderkey,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
order by
|
||||
revenue desc,
|
||||
select
|
||||
l_orderkey,
|
||||
sum(l_extendedprice * (1 - l_discount)) as revenue,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
from
|
||||
customer,
|
||||
orders,
|
||||
lineitem
|
||||
where
|
||||
c_mktsegment = 'BUILDING'
|
||||
and c_custkey = o_custkey
|
||||
and l_orderkey = o_orderkey
|
||||
and o_orderdate < date '1995-03-15'
|
||||
and l_shipdate > date '1995-03-15'
|
||||
group by
|
||||
l_orderkey,
|
||||
o_orderdate,
|
||||
o_shippriority
|
||||
order by
|
||||
revenue desc,
|
||||
o_orderdate;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
@ -1,24 +1,24 @@
|
||||
Q4
|
||||
select
|
||||
o_orderpriority,
|
||||
count(*) as order_count
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_orderdate >= date '1993-07-01'
|
||||
and o_orderdate < date '1993-07-01' + interval '3' month
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_orderkey = o_orderkey
|
||||
and l_commitdate < l_receiptdate
|
||||
)
|
||||
group by
|
||||
o_orderpriority
|
||||
order by
|
||||
select
|
||||
o_orderpriority,
|
||||
count(*) as order_count
|
||||
from
|
||||
orders
|
||||
where
|
||||
o_orderdate >= date '1993-07-01'
|
||||
and o_orderdate < date '1993-07-01' + interval '3' month
|
||||
and exists (
|
||||
select
|
||||
*
|
||||
from
|
||||
lineitem
|
||||
where
|
||||
l_orderkey = o_orderkey
|
||||
and l_commitdate < l_receiptdate
|
||||
)
|
||||
group by
|
||||
o_orderpriority
|
||||
order by
|
||||
o_orderpriority;
|
||||
|
||||
Oracle Execution Plan
|
||||
|
@ -36,190 +36,190 @@ group by
|
||||
order by
|
||||
supp_nation,
|
||||
cust_nation,
|
||||
l_year;
|
||||
|
||||
-- Q7 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_SUPPKEY, L_EXTENDEDPRICE, L_DISCOUNT, L_SHIPDATE
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$2
|
||||
Extended_information: FP:L_SHIPDATE>=TO_DATE('1995-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_SHIPDATE<=TO_DATE('1996-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
|
||||
Access_predicates:
|
||||
Filter_predicates: L_SHIPDATE>=TO_DATE('1995-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_SHIPDATE<=TO_DATE('1996-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_ORDERKEY, L_SHIPDATE, L_EXTENDEDPRICE, L_DISCOUNT
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=L_SUPPKEY
|
||||
Access_predicates: S_SUPPKEY=L_SUPPKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, O_CUSTKEY
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_DISCOUNT, L_SHIPDATE, L_EXTENDEDPRICE, O_CUSTKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_ORDERKEY=L_ORDERKEY
|
||||
Access_predicates: O_ORDERKEY=L_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N1.N_NATIONKEY, N1.N_NAME
|
||||
Object_name: NATION
|
||||
Alias: N1@SEL$2
|
||||
Extended_information: FP:N1.N_NAME=':1' OR N1.N_NAME=':2'
|
||||
Access_predicates:
|
||||
Filter_predicates: N1.N_NAME=':1'|N1.N_NAME=':2'
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_CUSTKEY, L_DISCOUNT, L_SHIPDATE, L_EXTENDEDPRICE, N1.N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_NATIONKEY=N1.N_NATIONKEY
|
||||
Access_predicates: S_NATIONKEY=N1.N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N2.N_NATIONKEY, N2.N_NAME
|
||||
Object_name: NATION
|
||||
Alias: N2@SEL$2
|
||||
Extended_information: FP:(N2.N_NAME=':1' OR N2.N_NAME=':2') AND (N1.N_NAME=':1' AND N2.N_NAME=':2' OR N1.N_NAME=':2' AND N2.N_NAME=':1')
|
||||
Access_predicates:
|
||||
Filter_predicates: (N2.N_NAME=':1'|N2.N_NAME=':2')&(N1.N_NAME=':1'&N2.N_NAME=':2'|N1.N_NAME=':2'&N2.N_NAME=':1')
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: nested loops
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_CUSTKEY, L_DISCOUNT, L_SHIPDATE, L_EXTENDEDPRICE, N1.N_NAME, N2.N_NATIONKEY, N2.N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_NATIONKEY
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N2.N_NAME, L_DISCOUNT, L_SHIPDATE, L_EXTENDEDPRICE, N1.N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:C_CUSTKEY=O_CUSTKEY AND C_NATIONKEY=N2.N_NATIONKEY
|
||||
Access_predicates: C_CUSTKEY=O_CUSTKEY&C_NATIONKEY=N2.N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N1.N_NAME, N2.N_NAME, EXTRACT(YEAR FROM INTERNAL_FUNCTION(L_SHIPDATE)), SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT))
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
l_year;
|
||||
|
||||
-- Q7 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_SUPPKEY, L_EXTENDEDPRICE, L_DISCOUNT, L_SHIPDATE
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$2
|
||||
Extended_information: FP:L_SHIPDATE>=TO_DATE('1995-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND L_SHIPDATE<=TO_DATE('1996-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
|
||||
Access_predicates:
|
||||
Filter_predicates: L_SHIPDATE>=TO_DATE('1995-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&L_SHIPDATE<=TO_DATE('1996-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_ORDERKEY, L_SHIPDATE, L_EXTENDEDPRICE, L_DISCOUNT
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=L_SUPPKEY
|
||||
Access_predicates: S_SUPPKEY=L_SUPPKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, O_CUSTKEY
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_DISCOUNT, L_SHIPDATE, L_EXTENDEDPRICE, O_CUSTKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_ORDERKEY=L_ORDERKEY
|
||||
Access_predicates: O_ORDERKEY=L_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N1.N_NATIONKEY, N1.N_NAME
|
||||
Object_name: NATION
|
||||
Alias: N1@SEL$2
|
||||
Extended_information: FP:N1.N_NAME=':1' OR N1.N_NAME=':2'
|
||||
Access_predicates:
|
||||
Filter_predicates: N1.N_NAME=':1'|N1.N_NAME=':2'
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_CUSTKEY, L_DISCOUNT, L_SHIPDATE, L_EXTENDEDPRICE, N1.N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_NATIONKEY=N1.N_NATIONKEY
|
||||
Access_predicates: S_NATIONKEY=N1.N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N2.N_NATIONKEY, N2.N_NAME
|
||||
Object_name: NATION
|
||||
Alias: N2@SEL$2
|
||||
Extended_information: FP:(N2.N_NAME=':1' OR N2.N_NAME=':2') AND (N1.N_NAME=':1' AND N2.N_NAME=':2' OR N1.N_NAME=':2' AND N2.N_NAME=':1')
|
||||
Access_predicates:
|
||||
Filter_predicates: (N2.N_NAME=':1'|N2.N_NAME=':2')&(N1.N_NAME=':1'&N2.N_NAME=':2'|N1.N_NAME=':2'&N2.N_NAME=':1')
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: nested loops
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_CUSTKEY, L_DISCOUNT, L_SHIPDATE, L_EXTENDEDPRICE, N1.N_NAME, N2.N_NATIONKEY, N2.N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_NATIONKEY
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N2.N_NAME, L_DISCOUNT, L_SHIPDATE, L_EXTENDEDPRICE, N1.N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:C_CUSTKEY=O_CUSTKEY AND C_NATIONKEY=N2.N_NATIONKEY
|
||||
Access_predicates: C_CUSTKEY=O_CUSTKEY&C_NATIONKEY=N2.N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N1.N_NAME, N2.N_NAME, EXTRACT(YEAR FROM INTERNAL_FUNCTION(L_SHIPDATE)), SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT))
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
|
@ -31,246 +31,246 @@ from
|
||||
group by
|
||||
o_year
|
||||
order by
|
||||
o_year;
|
||||
|
||||
-- Q8 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$2
|
||||
Extended_information: FP:P_TYPE=':3'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_TYPE=':3'
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_EXTENDEDPRICE, L_DISCOUNT
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_DISCOUNT, L_SUPPKEY, L_EXTENDEDPRICE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:P_PARTKEY=L_PARTKEY
|
||||
Access_predicates: P_PARTKEY=L_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_DISCOUNT, L_EXTENDEDPRICE, S_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=L_SUPPKEY
|
||||
Access_predicates: S_SUPPKEY=L_SUPPKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, O_CUSTKEY, O_ORDERDATE
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$2
|
||||
Extended_information: FP:O_ORDERDATE>=TO_DATE('1995-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND O_ORDERDATE<=TO_DATE('1996-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
|
||||
Access_predicates:
|
||||
Filter_predicates: O_ORDERDATE>=TO_DATE('1995-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&O_ORDERDATE<=TO_DATE('1996-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE, O_CUSTKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:L_ORDERKEY=O_ORDERKEY
|
||||
Access_predicates: L_ORDERKEY=O_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_NATIONKEY
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE, C_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_CUSTKEY=C_CUSTKEY
|
||||
Access_predicates: O_CUSTKEY=C_CUSTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N1.N_NATIONKEY, N1.N_REGIONKEY
|
||||
Object_name: NATION
|
||||
Alias: N1@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE, N1.N_REGIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:C_NATIONKEY=N1.N_NATIONKEY
|
||||
Access_predicates: C_NATIONKEY=N1.N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N2.N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: N2@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N1.N_REGIONKEY, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_NATIONKEY=N2.N_NATIONKEY
|
||||
Access_predicates: S_NATIONKEY=N2.N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: R_REGIONKEY
|
||||
Object_name: REGION
|
||||
Alias: REGION@SEL$2
|
||||
Extended_information: FP:R_NAME=':2'
|
||||
Access_predicates:
|
||||
Filter_predicates: R_NAME=':2'
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_ORDERDATE, L_DISCOUNT, L_EXTENDEDPRICE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:N1.N_REGIONKEY=R_REGIONKEY
|
||||
Access_predicates: N1.N_REGIONKEY=R_REGIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: EXTRACT(YEAR FROM INTERNAL_FUNCTION(O_ORDERDATE)), SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT))
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
o_year;
|
||||
|
||||
-- Q8 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$2
|
||||
Extended_information: FP:P_TYPE=':3'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_TYPE=':3'
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_EXTENDEDPRICE, L_DISCOUNT
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_DISCOUNT, L_SUPPKEY, L_EXTENDEDPRICE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:P_PARTKEY=L_PARTKEY
|
||||
Access_predicates: P_PARTKEY=L_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_DISCOUNT, L_EXTENDEDPRICE, S_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=L_SUPPKEY
|
||||
Access_predicates: S_SUPPKEY=L_SUPPKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, O_CUSTKEY, O_ORDERDATE
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$2
|
||||
Extended_information: FP:O_ORDERDATE>=TO_DATE('1995-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND O_ORDERDATE<=TO_DATE('1996-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
|
||||
Access_predicates:
|
||||
Filter_predicates: O_ORDERDATE>=TO_DATE('1995-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')&O_ORDERDATE<=TO_DATE('1996-12-31 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE, O_CUSTKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:L_ORDERKEY=O_ORDERKEY
|
||||
Access_predicates: L_ORDERKEY=O_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: C_CUSTKEY, C_NATIONKEY
|
||||
Object_name: CUSTOMER
|
||||
Alias: CUSTOMER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE, C_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_CUSTKEY=C_CUSTKEY
|
||||
Access_predicates: O_CUSTKEY=C_CUSTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N1.N_NATIONKEY, N1.N_REGIONKEY
|
||||
Object_name: NATION
|
||||
Alias: N1@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE, N1.N_REGIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:C_NATIONKEY=N1.N_NATIONKEY
|
||||
Access_predicates: C_NATIONKEY=N1.N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N2.N_NATIONKEY
|
||||
Object_name: NATION
|
||||
Alias: N2@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N1.N_REGIONKEY, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_NATIONKEY=N2.N_NATIONKEY
|
||||
Access_predicates: S_NATIONKEY=N2.N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: R_REGIONKEY
|
||||
Object_name: REGION
|
||||
Alias: REGION@SEL$2
|
||||
Extended_information: FP:R_NAME=':2'
|
||||
Access_predicates:
|
||||
Filter_predicates: R_NAME=':2'
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_ORDERDATE, L_DISCOUNT, L_EXTENDEDPRICE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:N1.N_REGIONKEY=R_REGIONKEY
|
||||
Access_predicates: N1.N_REGIONKEY=R_REGIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: EXTRACT(YEAR FROM INTERNAL_FUNCTION(O_ORDERDATE)), SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT))
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- End --
|
||||
|
@ -1,185 +1,185 @@
|
||||
-- Q9 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$2
|
||||
Extended_information: FP:P_NAME LIKE '%:1%'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_NAME LIKE '%:1%'
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_QUANTITY, L_EXTENDEDPRICE, L_DISCOUNT
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_PARTKEY, L_ORDERKEY, L_DISCOUNT, L_SUPPKEY, L_QUANTITY, L_EXTENDEDPRICE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:P_PARTKEY=L_PARTKEY
|
||||
Access_predicates: P_PARTKEY=L_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_SUPPKEY, L_PARTKEY, L_ORDERKEY, L_DISCOUNT, L_EXTENDEDPRICE, L_QUANTITY, S_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=L_SUPPKEY
|
||||
Access_predicates: S_SUPPKEY=L_SUPPKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY, PS_SUPPLYCOST
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_QUANTITY, L_ORDERKEY, L_DISCOUNT, L_EXTENDEDPRICE, PS_SUPPLYCOST
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:PS_SUPPKEY=L_SUPPKEY AND PS_PARTKEY=L_PARTKEY
|
||||
Access_predicates: PS_SUPPKEY=L_SUPPKEY&PS_PARTKEY=L_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, O_ORDERDATE
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_QUANTITY, PS_SUPPLYCOST, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_ORDERKEY=L_ORDERKEY
|
||||
Access_predicates: O_ORDERKEY=L_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY, N_NAME
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_ORDERDATE, L_QUANTITY, PS_SUPPLYCOST, L_DISCOUNT, L_EXTENDEDPRICE, N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N_NAME, EXTRACT(YEAR FROM INTERNAL_FUNCTION(O_ORDERDATE)), SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)-PS_SUPPLYCOST*L_QUANTITY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- END --
|
||||
-- Q9 Plan Start --
|
||||
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: P_PARTKEY
|
||||
Object_name: PART
|
||||
Alias: PART@SEL$2
|
||||
Extended_information: FP:P_NAME LIKE '%:1%'
|
||||
Access_predicates:
|
||||
Filter_predicates: P_NAME LIKE '%:1%'
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: L_ORDERKEY, L_PARTKEY, L_SUPPKEY, L_QUANTITY, L_EXTENDEDPRICE, L_DISCOUNT
|
||||
Object_name: LINEITEM
|
||||
Alias: LINEITEM@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_PARTKEY, L_ORDERKEY, L_DISCOUNT, L_SUPPKEY, L_QUANTITY, L_EXTENDEDPRICE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:P_PARTKEY=L_PARTKEY
|
||||
Access_predicates: P_PARTKEY=L_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: S_SUPPKEY, S_NATIONKEY
|
||||
Object_name: SUPPLIER
|
||||
Alias: SUPPLIER@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: L_SUPPKEY, L_PARTKEY, L_ORDERKEY, L_DISCOUNT, L_EXTENDEDPRICE, L_QUANTITY, S_NATIONKEY
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_SUPPKEY=L_SUPPKEY
|
||||
Access_predicates: S_SUPPKEY=L_SUPPKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: PS_PARTKEY, PS_SUPPKEY, PS_SUPPLYCOST
|
||||
Object_name: PARTSUPP
|
||||
Alias: PARTSUPP@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_QUANTITY, L_ORDERKEY, L_DISCOUNT, L_EXTENDEDPRICE, PS_SUPPLYCOST
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:PS_SUPPKEY=L_SUPPKEY AND PS_PARTKEY=L_PARTKEY
|
||||
Access_predicates: PS_SUPPKEY=L_SUPPKEY&PS_PARTKEY=L_PARTKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: O_ORDERKEY, O_ORDERDATE
|
||||
Object_name: ORDERS
|
||||
Alias: ORDERS@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: S_NATIONKEY, L_QUANTITY, PS_SUPPLYCOST, L_DISCOUNT, L_EXTENDEDPRICE, O_ORDERDATE
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:O_ORDERKEY=L_ORDERKEY
|
||||
Access_predicates: O_ORDERKEY=L_ORDERKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: table access
|
||||
Options: FULL
|
||||
Object_type: TABLE
|
||||
Other:
|
||||
Object_owner: CALUSER01
|
||||
Search_columns:
|
||||
Projection: N_NATIONKEY, N_NAME
|
||||
Object_name: NATION
|
||||
Alias: NATION@SEL$2
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: hash join
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: O_ORDERDATE, L_QUANTITY, PS_SUPPLYCOST, L_DISCOUNT, L_EXTENDEDPRICE, N_NAME
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information: AP:S_NATIONKEY=N_NATIONKEY
|
||||
Access_predicates: S_NATIONKEY=N_NATIONKEY
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
--------------------
|
||||
Operation: sort
|
||||
Options: GROUP BY
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection: N_NAME, EXTRACT(YEAR FROM INTERNAL_FUNCTION(O_ORDERDATE)), SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)-PS_SUPPLYCOST*L_QUANTITY)
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level: SEL$F5BB74E1
|
||||
--------------------
|
||||
Operation: select statement
|
||||
Options:
|
||||
Object_type:
|
||||
Other:
|
||||
Object_owner:
|
||||
Search_columns:
|
||||
Projection:
|
||||
Object_name:
|
||||
Alias:
|
||||
Extended_information:
|
||||
Access_predicates:
|
||||
Filter_predicates:
|
||||
Select_level:
|
||||
|
||||
-- END --
|
||||
|
@ -14,19 +14,19 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/*
|
||||
* $Id: calremoveuserpriority.sql 8777 2012-08-01 21:52:34Z zzhu $
|
||||
*/
|
||||
|
||||
DELIMITER $$
|
||||
CREATE PROCEDURE infinidb_querystats.calRemoveUserPriority(IN host VARCHAR(50), IN usr VARCHAR(50))
|
||||
LANGUAGE SQL
|
||||
NOT DETERMINISTIC
|
||||
MODIFIES SQL DATA
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'Procedure to remove a given InfiniDB user user_priority'
|
||||
BEGIN
|
||||
delete from infinidb_querystats.user_priority where upper(user_priority.user) = upper(usr) and upper(user_priority.host) = upper(host);
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
||||
/*
|
||||
* $Id: calremoveuserpriority.sql 8777 2012-08-01 21:52:34Z zzhu $
|
||||
*/
|
||||
|
||||
DELIMITER $$
|
||||
CREATE PROCEDURE infinidb_querystats.calRemoveUserPriority(IN host VARCHAR(50), IN usr VARCHAR(50))
|
||||
LANGUAGE SQL
|
||||
NOT DETERMINISTIC
|
||||
MODIFIES SQL DATA
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'Procedure to remove a given InfiniDB user user_priority'
|
||||
BEGIN
|
||||
delete from infinidb_querystats.user_priority where upper(user_priority.user) = upper(usr) and upper(user_priority.host) = upper(host);
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
@ -14,64 +14,64 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/*
|
||||
* $Id: calsetuserpriority.sql 9440 2013-04-24 21:07:42Z chao $
|
||||
*/
|
||||
|
||||
DELIMITER $$
|
||||
DROP PROCEDURE IF EXISTS infinidb_querystats.calSetUserPriority;
|
||||
CREATE PROCEDURE infinidb_querystats.calSetUserPriority(IN host VARCHAR(50), IN usr VARCHAR(50), IN pri VARCHAR(10))
|
||||
LANGUAGE SQL
|
||||
NOT DETERMINISTIC
|
||||
MODIFIES SQL DATA
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'Procedure to set a given InfiniDB user to the given priority'
|
||||
pri_validation: BEGIN
|
||||
IF upper(pri) not in ('HIGH', 'MEDIUM', 'LOW') THEN
|
||||
select "Priority can only be set to 'High', 'Medium', or 'Low'" Error;
|
||||
leave pri_validation;
|
||||
END IF;
|
||||
|
||||
IF INSTR(host, ":") != 0 THEN
|
||||
select "Port number cannot be used when setting user priority" Error;
|
||||
leave pri_validation;
|
||||
END IF;
|
||||
|
||||
user_validation: BEGIN
|
||||
DECLARE cnt,c INT;
|
||||
DECLARE cur_2 CURSOR for select count(*) from mysql.user where upper(user.host)=upper(host) and upper(user.user)=upper(usr);
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND
|
||||
SET c = 1;
|
||||
OPEN cur_2;
|
||||
SET cnt = 0;
|
||||
REPEAT
|
||||
FETCH cur_2 into cnt;
|
||||
until c = 1
|
||||
END REPEAT;
|
||||
IF cnt = 0 THEN
|
||||
select "User does not exist in MySQL" Error;
|
||||
LEAVE user_validation;
|
||||
END IF;
|
||||
|
||||
BEGIN
|
||||
DECLARE a, b INT;
|
||||
DECLARE cur_1 CURSOR FOR SELECT count(*) FROM infinidb_querystats.user_priority where upper(user)=upper(usr) and upper(user_priority.host)=upper(host);
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND
|
||||
SET b = 1;
|
||||
OPEN cur_1;
|
||||
SET a = 0;
|
||||
REPEAT
|
||||
FETCH cur_1 INTO a;
|
||||
UNTIL b = 1
|
||||
END REPEAT;
|
||||
CLOSE cur_1;
|
||||
IF a = 0 THEN
|
||||
insert into infinidb_querystats.user_priority values (host, usr, upper(pri));
|
||||
ELSE
|
||||
update infinidb_querystats.user_priority set priority=upper(pri) where upper(user)=upper(usr) and upper(user_priority.host)=upper(host);
|
||||
END IF;
|
||||
END;
|
||||
END;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
||||
/*
|
||||
* $Id: calsetuserpriority.sql 9440 2013-04-24 21:07:42Z chao $
|
||||
*/
|
||||
|
||||
DELIMITER $$
|
||||
DROP PROCEDURE IF EXISTS infinidb_querystats.calSetUserPriority;
|
||||
CREATE PROCEDURE infinidb_querystats.calSetUserPriority(IN host VARCHAR(50), IN usr VARCHAR(50), IN pri VARCHAR(10))
|
||||
LANGUAGE SQL
|
||||
NOT DETERMINISTIC
|
||||
MODIFIES SQL DATA
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'Procedure to set a given InfiniDB user to the given priority'
|
||||
pri_validation: BEGIN
|
||||
IF upper(pri) not in ('HIGH', 'MEDIUM', 'LOW') THEN
|
||||
select "Priority can only be set to 'High', 'Medium', or 'Low'" Error;
|
||||
leave pri_validation;
|
||||
END IF;
|
||||
|
||||
IF INSTR(host, ":") != 0 THEN
|
||||
select "Port number cannot be used when setting user priority" Error;
|
||||
leave pri_validation;
|
||||
END IF;
|
||||
|
||||
user_validation: BEGIN
|
||||
DECLARE cnt,c INT;
|
||||
DECLARE cur_2 CURSOR for select count(*) from mysql.user where upper(user.host)=upper(host) and upper(user.user)=upper(usr);
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND
|
||||
SET c = 1;
|
||||
OPEN cur_2;
|
||||
SET cnt = 0;
|
||||
REPEAT
|
||||
FETCH cur_2 into cnt;
|
||||
until c = 1
|
||||
END REPEAT;
|
||||
IF cnt = 0 THEN
|
||||
select "User does not exist in MySQL" Error;
|
||||
LEAVE user_validation;
|
||||
END IF;
|
||||
|
||||
BEGIN
|
||||
DECLARE a, b INT;
|
||||
DECLARE cur_1 CURSOR FOR SELECT count(*) FROM infinidb_querystats.user_priority where upper(user)=upper(usr) and upper(user_priority.host)=upper(host);
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND
|
||||
SET b = 1;
|
||||
OPEN cur_1;
|
||||
SET a = 0;
|
||||
REPEAT
|
||||
FETCH cur_1 INTO a;
|
||||
UNTIL b = 1
|
||||
END REPEAT;
|
||||
CLOSE cur_1;
|
||||
IF a = 0 THEN
|
||||
insert into infinidb_querystats.user_priority values (host, usr, upper(pri));
|
||||
ELSE
|
||||
update infinidb_querystats.user_priority set priority=upper(pri) where upper(user)=upper(usr) and upper(user_priority.host)=upper(host);
|
||||
END IF;
|
||||
END;
|
||||
END;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
@ -14,36 +14,36 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/*
|
||||
* $Id: calshowprocesslist.sql 9736 2013-08-02 18:49:52Z zzhu $
|
||||
*/
|
||||
|
||||
DELIMITER $$
|
||||
DROP PROCEDURE IF EXISTS infinidb_querystats.calShowProcessList;
|
||||
CREATE PROCEDURE infinidb_querystats.calShowProcessList()
|
||||
LANGUAGE SQL
|
||||
NOT DETERMINISTIC
|
||||
MODIFIES SQL DATA
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'Procedure to set a given InfiniDB user to the given priority'
|
||||
BEGIN
|
||||
SELECT id SESSION, processlist.user USER, upper(user_priority.priority) PRIORITY, processlist.host `HOST`,
|
||||
db `DB`, command `COMMAND`, (now() - interval time second) `START TIME`, time `EXEC TIME`, state `STATE`,
|
||||
info `INFO` FROM information_schema.processlist
|
||||
LEFT JOIN infinidb_querystats.user_priority ON
|
||||
(
|
||||
UPPER(CASE WHEN INSTR(processlist.host, ':') = 0
|
||||
THEN processlist.host
|
||||
ELSE SUBSTR(processlist.host, 1, INSTR(processlist.host, ':')-1 )
|
||||
END) =
|
||||
UPPER(CASE WHEN INSTR(user_priority.host, ':') = 0
|
||||
THEN user_priority.host
|
||||
ELSE SUBSTR(user_priority.host, 1, INSTR(user_priority.host, ':')-1 )
|
||||
END)
|
||||
AND
|
||||
UPPER(processlist.user) = UPPER(user_priority.user)
|
||||
)
|
||||
WHERE db != 'infinidb_querystats';
|
||||
END$$
|
||||
delimiter ;
|
||||
|
||||
/*
|
||||
* $Id: calshowprocesslist.sql 9736 2013-08-02 18:49:52Z zzhu $
|
||||
*/
|
||||
|
||||
DELIMITER $$
|
||||
DROP PROCEDURE IF EXISTS infinidb_querystats.calShowProcessList;
|
||||
CREATE PROCEDURE infinidb_querystats.calShowProcessList()
|
||||
LANGUAGE SQL
|
||||
NOT DETERMINISTIC
|
||||
MODIFIES SQL DATA
|
||||
SQL SECURITY INVOKER
|
||||
COMMENT 'Procedure to set a given InfiniDB user to the given priority'
|
||||
BEGIN
|
||||
SELECT id SESSION, processlist.user USER, upper(user_priority.priority) PRIORITY, processlist.host `HOST`,
|
||||
db `DB`, command `COMMAND`, (now() - interval time second) `START TIME`, time `EXEC TIME`, state `STATE`,
|
||||
info `INFO` FROM information_schema.processlist
|
||||
LEFT JOIN infinidb_querystats.user_priority ON
|
||||
(
|
||||
UPPER(CASE WHEN INSTR(processlist.host, ':') = 0
|
||||
THEN processlist.host
|
||||
ELSE SUBSTR(processlist.host, 1, INSTR(processlist.host, ':')-1 )
|
||||
END) =
|
||||
UPPER(CASE WHEN INSTR(user_priority.host, ':') = 0
|
||||
THEN user_priority.host
|
||||
ELSE SUBSTR(user_priority.host, 1, INSTR(user_priority.host, ':')-1 )
|
||||
END)
|
||||
AND
|
||||
UPPER(processlist.user) = UPPER(user_priority.user)
|
||||
)
|
||||
WHERE db != 'infinidb_querystats';
|
||||
END$$
|
||||
delimiter ;
|
||||
|
@ -1,326 +1,326 @@
|
||||
# -------------------------------------------------------------- #
|
||||
# Test case migrated from regression test suite: bug3932.sql
|
||||
#
|
||||
# Author: Daniel Lee, daniel.lee@mariadb.com
|
||||
# -------------------------------------------------------------- #
|
||||
#
|
||||
--source ../include/have_columnstore.inc
|
||||
#
|
||||
USE tpch1;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists qa_nation;
|
||||
drop table if exists qa_customer;
|
||||
drop table if exists qa_region;
|
||||
drop table if exists qa_orders;
|
||||
--enable_warnings
|
||||
|
||||
create table qa_nation (n_id int, n_name char(20), regionid int) engine=columnstore;
|
||||
create table qa_customer (c_id int, c_custname char(20), nationid int) engine=columnstore;
|
||||
create table qa_region (r_id int, r_name char(20)) engine=columnstore;
|
||||
create table qa_orders (o_id int, o_name char(20), custid int) engine=columnstore;
|
||||
|
||||
insert into qa_region values (1, 'ASIA'), (2, 'AMERICA'), (3, 'EUROPE');
|
||||
insert into qa_nation values (1, 'UNITED STATES', 2), (2, 'CANADA', 2), (3, 'JAPAN', 1), (4, 'CHINA', 1), (5, 'GERMANY', 3), (6, 'ITALY', 3);
|
||||
insert into qa_customer values (1, 'Cust_US', 1), (2, 'Cust_Japan', 3), (3, 'Cust_Italy', 6);
|
||||
insert into qa_orders values (1, 'Order_US#1', 1), (2, 'Order_US#2', 1), (3, 'Order_Japan#1', 2);
|
||||
|
||||
select n.n_name, c.c_custname
|
||||
from qa_nation n
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by n.n_name;
|
||||
|
||||
select n.n_name, c.c_custname
|
||||
from qa_nation n
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by n.n_name;
|
||||
|
||||
select n.n_name, count(c.c_id)
|
||||
from qa_nation n
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) group by n.n_name order by n.n_name;
|
||||
|
||||
select n.n_name, c.c_custname
|
||||
from qa_nation n
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by n.n_name;
|
||||
|
||||
select n.n_name, c.c_custname
|
||||
from qa_nation n
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by n.n_name;
|
||||
|
||||
select n.n_name, count(c.c_id)
|
||||
from qa_nation n
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) group by n.n_name order by n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Japan') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Italy') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Japan') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Italy') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Japan') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Italy') order by r.r_name, n.n_name;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists qa_nation;
|
||||
drop table if exists qa_customer;
|
||||
drop table if exists qa_region;
|
||||
drop table if exists qa_orders;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
# -------------------------------------------------------------- #
|
||||
# Test case migrated from regression test suite: bug3932.sql
|
||||
#
|
||||
# Author: Daniel Lee, daniel.lee@mariadb.com
|
||||
# -------------------------------------------------------------- #
|
||||
#
|
||||
--source ../include/have_columnstore.inc
|
||||
#
|
||||
USE tpch1;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists qa_nation;
|
||||
drop table if exists qa_customer;
|
||||
drop table if exists qa_region;
|
||||
drop table if exists qa_orders;
|
||||
--enable_warnings
|
||||
|
||||
create table qa_nation (n_id int, n_name char(20), regionid int) engine=columnstore;
|
||||
create table qa_customer (c_id int, c_custname char(20), nationid int) engine=columnstore;
|
||||
create table qa_region (r_id int, r_name char(20)) engine=columnstore;
|
||||
create table qa_orders (o_id int, o_name char(20), custid int) engine=columnstore;
|
||||
|
||||
insert into qa_region values (1, 'ASIA'), (2, 'AMERICA'), (3, 'EUROPE');
|
||||
insert into qa_nation values (1, 'UNITED STATES', 2), (2, 'CANADA', 2), (3, 'JAPAN', 1), (4, 'CHINA', 1), (5, 'GERMANY', 3), (6, 'ITALY', 3);
|
||||
insert into qa_customer values (1, 'Cust_US', 1), (2, 'Cust_Japan', 3), (3, 'Cust_Italy', 6);
|
||||
insert into qa_orders values (1, 'Order_US#1', 1), (2, 'Order_US#2', 1), (3, 'Order_Japan#1', 2);
|
||||
|
||||
select n.n_name, c.c_custname
|
||||
from qa_nation n
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by n.n_name;
|
||||
|
||||
select n.n_name, c.c_custname
|
||||
from qa_nation n
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by n.n_name;
|
||||
|
||||
select n.n_name, count(c.c_id)
|
||||
from qa_nation n
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) group by n.n_name order by n.n_name;
|
||||
|
||||
select n.n_name, c.c_custname
|
||||
from qa_nation n
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by n.n_name;
|
||||
|
||||
select n.n_name, c.c_custname
|
||||
from qa_nation n
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by n.n_name;
|
||||
|
||||
select n.n_name, count(c.c_id)
|
||||
from qa_nation n
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) group by n.n_name order by n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
left outer join qa_customer c on n.n_id = c.nationid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where n.n_id in (select n2.n_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and r1.r_name = 'AMERICA') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where r.r_id in (select r1.r_id from qa_nation n2, qa_region r1 where n2.regionid = r1.r_id and n2.n_name = 'UNITED STATES') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1) order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Japan') order by r.r_name, n.n_name, o.o_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Italy') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Japan') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Italy') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Japan') order by r.r_name, n.n_name;
|
||||
|
||||
select r.r_name, n.n_name, c.c_custname, o.o_name
|
||||
from qa_region r
|
||||
join qa_nation n on r.r_id = n.regionid
|
||||
join qa_customer c on n.n_id = c.nationid
|
||||
left outer join qa_orders o on c.c_id = o.custid
|
||||
where c.c_id in (select c1.c_id from qa_customer c1 where c1.c_custname = 'Cust_Italy') order by r.r_name, n.n_name;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists qa_nation;
|
||||
drop table if exists qa_customer;
|
||||
drop table if exists qa_region;
|
||||
drop table if exists qa_orders;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
|
@ -8,13 +8,13 @@
|
||||
#
|
||||
USE tpch1;
|
||||
#
|
||||
set autocommit=0;
|
||||
update lineitem a join region b on b.r_regionkey = a.l_orderkey set b.r_regionkey=2;
|
||||
select * from region;
|
||||
rollback;
|
||||
select * from region;
|
||||
update region b join lineitem a on b.r_regionkey = a.l_orderkey set b.r_regionkey=2;
|
||||
select * from region;
|
||||
rollback;
|
||||
set autocommit=0;
|
||||
update lineitem a join region b on b.r_regionkey = a.l_orderkey set b.r_regionkey=2;
|
||||
select * from region;
|
||||
rollback;
|
||||
select * from region;
|
||||
update region b join lineitem a on b.r_regionkey = a.l_orderkey set b.r_regionkey=2;
|
||||
select * from region;
|
||||
rollback;
|
||||
select * from region;#
|
||||
|
||||
|
@ -1,82 +1,82 @@
|
||||
# -------------------------------------------------------------- #
|
||||
# Test case migrated from regression test suite: bug3998.sql
|
||||
#
|
||||
# Author: Daniel Lee, daniel.lee@mariadb.com
|
||||
# -------------------------------------------------------------- #
|
||||
#
|
||||
--source ../include/have_columnstore.inc
|
||||
#
|
||||
USE tpch1;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists bug3998a;
|
||||
drop table if exists bug3998b;
|
||||
drop table if exists bug3998c;
|
||||
drop table if exists bug3998d;
|
||||
--enable_warnings
|
||||
|
||||
create table bug3998a (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998a values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998a;
|
||||
|
||||
create table bug3998b (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998b values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998b;
|
||||
|
||||
create table bug3998c (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998c values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998c;
|
||||
|
||||
create table bug3998d (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998d values (1,1), (2,1), (5, 1), (null,1), (null, null);
|
||||
select * from bug3998d;
|
||||
|
||||
update bug3998a left join bug3998d on bug3998a.c1 = bug3998d.c1 set bug3998a.c1=9;
|
||||
select * from bug3998a;
|
||||
|
||||
update bug3998b join bug3998d on bug3998b.c1 = bug3998d.c1 set bug3998b.c1=9;
|
||||
select * from bug3998b;
|
||||
|
||||
update bug3998c right join bug3998d on bug3998c.c1 = bug3998d.c1 set bug3998c.c1=9;
|
||||
select * from bug3998c;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists bug3998a;
|
||||
drop table if exists bug3998b;
|
||||
drop table if exists bug3998c;
|
||||
drop table if exists bug3998d;
|
||||
--enable_warnings
|
||||
|
||||
create table bug3998a (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998a values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998a;
|
||||
|
||||
create table bug3998b (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998b values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998b;
|
||||
|
||||
create table bug3998c (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998c values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998c;
|
||||
|
||||
create table bug3998d (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998d values (1,1), (2,1), (5, 1), (null,1), (null, null);
|
||||
select * from bug3998d;
|
||||
|
||||
delete a from bug3998a a left join bug3998d d on a.c1 = d.c1;
|
||||
select * from bug3998a;
|
||||
|
||||
delete b from bug3998b b join bug3998d d on b.c1 = d.c1;
|
||||
select * from bug3998b;
|
||||
|
||||
delete c from bug3998c c right join bug3998d d on c.c1 = d.c1;
|
||||
select * from bug3998c;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists bug3998a;
|
||||
drop table if exists bug3998b;
|
||||
drop table if exists bug3998c;
|
||||
drop table if exists bug3998d;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
# -------------------------------------------------------------- #
|
||||
# Test case migrated from regression test suite: bug3998.sql
|
||||
#
|
||||
# Author: Daniel Lee, daniel.lee@mariadb.com
|
||||
# -------------------------------------------------------------- #
|
||||
#
|
||||
--source ../include/have_columnstore.inc
|
||||
#
|
||||
USE tpch1;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists bug3998a;
|
||||
drop table if exists bug3998b;
|
||||
drop table if exists bug3998c;
|
||||
drop table if exists bug3998d;
|
||||
--enable_warnings
|
||||
|
||||
create table bug3998a (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998a values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998a;
|
||||
|
||||
create table bug3998b (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998b values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998b;
|
||||
|
||||
create table bug3998c (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998c values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998c;
|
||||
|
||||
create table bug3998d (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998d values (1,1), (2,1), (5, 1), (null,1), (null, null);
|
||||
select * from bug3998d;
|
||||
|
||||
update bug3998a left join bug3998d on bug3998a.c1 = bug3998d.c1 set bug3998a.c1=9;
|
||||
select * from bug3998a;
|
||||
|
||||
update bug3998b join bug3998d on bug3998b.c1 = bug3998d.c1 set bug3998b.c1=9;
|
||||
select * from bug3998b;
|
||||
|
||||
update bug3998c right join bug3998d on bug3998c.c1 = bug3998d.c1 set bug3998c.c1=9;
|
||||
select * from bug3998c;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists bug3998a;
|
||||
drop table if exists bug3998b;
|
||||
drop table if exists bug3998c;
|
||||
drop table if exists bug3998d;
|
||||
--enable_warnings
|
||||
|
||||
create table bug3998a (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998a values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998a;
|
||||
|
||||
create table bug3998b (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998b values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998b;
|
||||
|
||||
create table bug3998c (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998c values (0,0), (1,1), (2,1), (3, 1), (null,1), (null, null);
|
||||
select * from bug3998c;
|
||||
|
||||
create table bug3998d (c1 int, c2 int) engine=columnstore;
|
||||
insert into bug3998d values (1,1), (2,1), (5, 1), (null,1), (null, null);
|
||||
select * from bug3998d;
|
||||
|
||||
delete a from bug3998a a left join bug3998d d on a.c1 = d.c1;
|
||||
select * from bug3998a;
|
||||
|
||||
delete b from bug3998b b join bug3998d d on b.c1 = d.c1;
|
||||
select * from bug3998b;
|
||||
|
||||
delete c from bug3998c c right join bug3998d d on c.c1 = d.c1;
|
||||
select * from bug3998c;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists bug3998a;
|
||||
drop table if exists bug3998b;
|
||||
drop table if exists bug3998c;
|
||||
drop table if exists bug3998d;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
|
@ -1,37 +1,37 @@
|
||||
# -------------------------------------------------------------- #
|
||||
# Test case migrated from regression test suite: MCOL-4126.sql
|
||||
#
|
||||
# Author: Daniel Lee, daniel.lee@mariadb.com
|
||||
# -------------------------------------------------------------- #
|
||||
#
|
||||
--source ../include/have_columnstore.inc
|
||||
#
|
||||
USE tpch1;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists T4126_1;
|
||||
drop table if exists T4126_2;
|
||||
--enable_warnings
|
||||
|
||||
create table T4126_1 (idx int, col varchar(20)) engine=columnstore;
|
||||
create table T4126_2 (idx int, col varchar(20), col2 varchar(20)) engine=columnstore;
|
||||
insert into T4126_1 values (3, 'a');
|
||||
select * from T4126_1;
|
||||
|
||||
insert into T4126_2 values (1, 'lamp', 'table lamp');
|
||||
select * from T4126_2;
|
||||
update T4126_2 set col = "floor lamp" where col = 'lamp';
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists T4126_1;
|
||||
drop table if exists T4126_2;
|
||||
--enable_warnings
|
||||
|
||||
create table T4126_1 (idx1 int, col1 varchar(20)) engine=columnstore;
|
||||
insert into T4126_1 values (3, 'a');
|
||||
select * from T4126_1;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists T4126_1;
|
||||
--enable_warnings
|
||||
#
|
||||
# -------------------------------------------------------------- #
|
||||
# Test case migrated from regression test suite: MCOL-4126.sql
|
||||
#
|
||||
# Author: Daniel Lee, daniel.lee@mariadb.com
|
||||
# -------------------------------------------------------------- #
|
||||
#
|
||||
--source ../include/have_columnstore.inc
|
||||
#
|
||||
USE tpch1;
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists T4126_1;
|
||||
drop table if exists T4126_2;
|
||||
--enable_warnings
|
||||
|
||||
create table T4126_1 (idx int, col varchar(20)) engine=columnstore;
|
||||
create table T4126_2 (idx int, col varchar(20), col2 varchar(20)) engine=columnstore;
|
||||
insert into T4126_1 values (3, 'a');
|
||||
select * from T4126_1;
|
||||
|
||||
insert into T4126_2 values (1, 'lamp', 'table lamp');
|
||||
select * from T4126_2;
|
||||
update T4126_2 set col = "floor lamp" where col = 'lamp';
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists T4126_1;
|
||||
drop table if exists T4126_2;
|
||||
--enable_warnings
|
||||
|
||||
create table T4126_1 (idx1 int, col1 varchar(20)) engine=columnstore;
|
||||
insert into T4126_1 values (3, 'a');
|
||||
select * from T4126_1;
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists T4126_1;
|
||||
--enable_warnings
|
||||
#
|
||||
|
@ -1,76 +1,76 @@
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1_compareLogOnly/storedProcedures/sp.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
--disable_warnings
|
||||
drop procedure if exists sp_simple_select;
|
||||
drop procedure if exists sp_simple_variable;
|
||||
drop procedure if exists sp_simple_variables;
|
||||
drop procedure if exists sp_complex_variable;
|
||||
drop procedure if exists proc1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
DELIMITER $$;
|
||||
Create Procedure sp_simple_select( )
|
||||
begin
|
||||
select * from part where p_partkey < 5;
|
||||
end $$
|
||||
|
||||
# Simple SP with 1 arg
|
||||
Create Procedure sp_simple_variable(in arg_key int)
|
||||
begin
|
||||
select * from part where p_partkey <= arg_key;
|
||||
end $$
|
||||
|
||||
# Simple SP with multiple args
|
||||
Create Procedure sp_simple_variables(in arg_key int, in arg_string varchar(25))
|
||||
begin
|
||||
select * from nation where n_nationkey <= arg_key and n_name > arg_string;
|
||||
end $$
|
||||
|
||||
# Simple SP with cross table select query
|
||||
Create Procedure sp_complex_variable(in arg_key int, in arg_date date)
|
||||
begin
|
||||
Select * from lineitem, orders where o_custkey < arg_key and
|
||||
l_partkey < 10000 and l_shipdate>arg_date and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;
|
||||
end $$
|
||||
|
||||
# SP with DDL
|
||||
create procedure proc1()
|
||||
begin
|
||||
create table if not exists t1 (id int)engine=columnstore;
|
||||
start transaction;
|
||||
alter table t1 add column c3 integer;
|
||||
insert into t1 values (1,2);
|
||||
commit;
|
||||
end$$
|
||||
|
||||
DELIMITER ;$$
|
||||
|
||||
call sp_simple_select;
|
||||
call sp_simple_variable(2);
|
||||
call sp_simple_variables(10, 'AMERICA');
|
||||
call sp_complex_variable(1000, '1998-10-10');
|
||||
call proc1();
|
||||
# Should get 'Duplicate column name' error this time
|
||||
--error 1060
|
||||
call proc1();
|
||||
|
||||
--disable_warnings
|
||||
drop table t1;
|
||||
drop procedure sp_simple_select;
|
||||
drop procedure sp_simple_variable;
|
||||
drop procedure sp_simple_variables;
|
||||
drop procedure sp_complex_variable;
|
||||
drop procedure proc1;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1_compareLogOnly/storedProcedures/sp.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
--disable_warnings
|
||||
drop procedure if exists sp_simple_select;
|
||||
drop procedure if exists sp_simple_variable;
|
||||
drop procedure if exists sp_simple_variables;
|
||||
drop procedure if exists sp_complex_variable;
|
||||
drop procedure if exists proc1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
DELIMITER $$;
|
||||
Create Procedure sp_simple_select( )
|
||||
begin
|
||||
select * from part where p_partkey < 5;
|
||||
end $$
|
||||
|
||||
# Simple SP with 1 arg
|
||||
Create Procedure sp_simple_variable(in arg_key int)
|
||||
begin
|
||||
select * from part where p_partkey <= arg_key;
|
||||
end $$
|
||||
|
||||
# Simple SP with multiple args
|
||||
Create Procedure sp_simple_variables(in arg_key int, in arg_string varchar(25))
|
||||
begin
|
||||
select * from nation where n_nationkey <= arg_key and n_name > arg_string;
|
||||
end $$
|
||||
|
||||
# Simple SP with cross table select query
|
||||
Create Procedure sp_complex_variable(in arg_key int, in arg_date date)
|
||||
begin
|
||||
Select * from lineitem, orders where o_custkey < arg_key and
|
||||
l_partkey < 10000 and l_shipdate>arg_date and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;
|
||||
end $$
|
||||
|
||||
# SP with DDL
|
||||
create procedure proc1()
|
||||
begin
|
||||
create table if not exists t1 (id int)engine=columnstore;
|
||||
start transaction;
|
||||
alter table t1 add column c3 integer;
|
||||
insert into t1 values (1,2);
|
||||
commit;
|
||||
end$$
|
||||
|
||||
DELIMITER ;$$
|
||||
|
||||
call sp_simple_select;
|
||||
call sp_simple_variable(2);
|
||||
call sp_simple_variables(10, 'AMERICA');
|
||||
call sp_complex_variable(1000, '1998-10-10');
|
||||
call proc1();
|
||||
# Should get 'Duplicate column name' error this time
|
||||
--error 1060
|
||||
call proc1();
|
||||
|
||||
--disable_warnings
|
||||
drop table t1;
|
||||
drop procedure sp_simple_select;
|
||||
drop procedure sp_simple_variable;
|
||||
drop procedure sp_simple_variables;
|
||||
drop procedure sp_complex_variable;
|
||||
drop procedure proc1;
|
||||
--enable_warnings
|
||||
#
|
||||
|
@ -1,171 +1,171 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1_compareLogOnly/storedProcedures/sp_autoswitch.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
# Simple SP without args
|
||||
DELIMITER $$;
|
||||
drop procedure if exists sp_simple_select;
|
||||
|
||||
Create Procedure sp_simple_select( )
|
||||
begin
|
||||
select * from part where p_partkey < 5;
|
||||
end $$
|
||||
|
||||
# Simple SP with 1 arg
|
||||
drop procedure if exists sp_simple_variable;
|
||||
|
||||
Create Procedure sp_simple_variable(in arg_key int)
|
||||
begin
|
||||
select * from part where p_partkey <= arg_key;
|
||||
end $$
|
||||
|
||||
# Simple SP with multiple args
|
||||
drop procedure if exists sp_simple_variables;
|
||||
|
||||
Create Procedure sp_simple_variables(in arg_key int, in arg_string varchar(25))
|
||||
begin
|
||||
select * from nation where n_nationkey <= arg_key and n_name > arg_string;
|
||||
end $$
|
||||
|
||||
# Simple SP with cross table select query
|
||||
drop procedure if exists sp_complex_variable;
|
||||
|
||||
Create Procedure sp_complex_variable(in arg_key int, in arg_date date)
|
||||
begin
|
||||
Select * from lineitem, orders where o_custkey < arg_key and
|
||||
l_partkey < 10000 and l_shipdate>arg_date and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;
|
||||
end $$
|
||||
|
||||
# Complex SP. All following SPs will fail vtable mode
|
||||
drop procedure if exists sp_unstructured_loop;
|
||||
|
||||
Create Procedure sp_unstructured_loop(in arg_key int)
|
||||
begin
|
||||
declare v_col1 int;
|
||||
declare v_col2 char(122);
|
||||
declare no_more_rows boolean ;
|
||||
declare cursor1 cursor for
|
||||
select p_partkey, p_name from part where p_partkey <= arg_key;
|
||||
declare continue handler for not found
|
||||
set no_more_rows := TRUE;
|
||||
set no_more_rows := false;
|
||||
open cursor1;
|
||||
LOOP1: loop
|
||||
fetch cursor1
|
||||
into v_col1, v_col2
|
||||
;
|
||||
if no_more_rows then
|
||||
close cursor1;
|
||||
leave LOOP1;
|
||||
end if;
|
||||
--
|
||||
select v_col1, v_col2;
|
||||
--
|
||||
end loop LOOP1;
|
||||
end$$
|
||||
|
||||
|
||||
drop procedure if exists sp_repeat_loop;
|
||||
|
||||
Create Procedure sp_repeat_loop(in arg_key int, in arg_key2 int)
|
||||
begin
|
||||
DECLARE done INT DEFAULT 0;
|
||||
DECLARE a CHAR(122);
|
||||
DECLARE b INT;
|
||||
DECLARE cur1
|
||||
CURSOR FOR
|
||||
SELECT p_partkey, p_name
|
||||
FROM part where p_partkey between arg_key and arg_key2;
|
||||
DECLARE
|
||||
CONTINUE HANDLER FOR
|
||||
SQLSTATE '02000'
|
||||
SET done = 1;
|
||||
|
||||
OPEN cur1;
|
||||
|
||||
REPEAT
|
||||
FETCH cur1 INTO b, a;
|
||||
if not done then
|
||||
select b, a;
|
||||
end if;
|
||||
UNTIL
|
||||
done
|
||||
END REPEAT;
|
||||
|
||||
CLOSE cur1;
|
||||
end$$
|
||||
|
||||
drop procedure if exists sp_while_loop;
|
||||
|
||||
Create Procedure sp_while_loop(in arg_key int, in arg_key2 int)
|
||||
begin
|
||||
DECLARE done INT DEFAULT 0;
|
||||
DECLARE a CHAR(116);
|
||||
DECLARE b INT;
|
||||
DECLARE cur1
|
||||
CURSOR FOR
|
||||
SELECT p_partkey, p_name
|
||||
FROM part where p_partkey between arg_key and arg_key2;
|
||||
DECLARE
|
||||
CONTINUE HANDLER FOR
|
||||
SQLSTATE '02000'
|
||||
SET done = 1;
|
||||
|
||||
OPEN cur1;
|
||||
|
||||
FETCH cur1 INTO b, a;
|
||||
WHILE NOT done DO
|
||||
if not done then
|
||||
select b, a;
|
||||
end if;
|
||||
FETCH cur1 INTO b, a;
|
||||
END WHILE;
|
||||
|
||||
CLOSE cur1;
|
||||
end$$
|
||||
|
||||
# SP with DDL
|
||||
drop procedure if exists proc1;
|
||||
|
||||
create procedure proc1()
|
||||
begin
|
||||
drop table if exists t1;
|
||||
create table if not exists t1 (id int)engine=columnstore;
|
||||
start transaction;
|
||||
alter table t1 add column c3 integer;
|
||||
insert into t1 values (1,2);
|
||||
select * into @a, @b from t1;
|
||||
drop table t1;
|
||||
commit;
|
||||
end$$
|
||||
|
||||
DELIMITER ;$$
|
||||
call sp_simple_select;
|
||||
call sp_simple_variable(2);
|
||||
call sp_simple_variables(10, 'AMERICA');
|
||||
call sp_complex_variable(1000, '1998-10-10');
|
||||
call sp_unstructured_loop(2);
|
||||
call sp_repeat_loop(1,2);
|
||||
call sp_while_loop(1,2);
|
||||
call proc1();
|
||||
select @a, @b;
|
||||
|
||||
--disable_warnings
|
||||
drop procedure sp_simple_select;
|
||||
drop procedure sp_simple_variable;
|
||||
drop procedure sp_simple_variables;
|
||||
drop procedure sp_complex_variable;
|
||||
drop procedure sp_unstructured_loop;
|
||||
drop procedure sp_repeat_loop;
|
||||
drop procedure sp_while_loop;
|
||||
drop procedure proc1;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1_compareLogOnly/storedProcedures/sp_autoswitch.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
# Simple SP without args
|
||||
DELIMITER $$;
|
||||
drop procedure if exists sp_simple_select;
|
||||
|
||||
Create Procedure sp_simple_select( )
|
||||
begin
|
||||
select * from part where p_partkey < 5;
|
||||
end $$
|
||||
|
||||
# Simple SP with 1 arg
|
||||
drop procedure if exists sp_simple_variable;
|
||||
|
||||
Create Procedure sp_simple_variable(in arg_key int)
|
||||
begin
|
||||
select * from part where p_partkey <= arg_key;
|
||||
end $$
|
||||
|
||||
# Simple SP with multiple args
|
||||
drop procedure if exists sp_simple_variables;
|
||||
|
||||
Create Procedure sp_simple_variables(in arg_key int, in arg_string varchar(25))
|
||||
begin
|
||||
select * from nation where n_nationkey <= arg_key and n_name > arg_string;
|
||||
end $$
|
||||
|
||||
# Simple SP with cross table select query
|
||||
drop procedure if exists sp_complex_variable;
|
||||
|
||||
Create Procedure sp_complex_variable(in arg_key int, in arg_date date)
|
||||
begin
|
||||
Select * from lineitem, orders where o_custkey < arg_key and
|
||||
l_partkey < 10000 and l_shipdate>arg_date and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;
|
||||
end $$
|
||||
|
||||
# Complex SP. All following SPs will fail vtable mode
|
||||
drop procedure if exists sp_unstructured_loop;
|
||||
|
||||
Create Procedure sp_unstructured_loop(in arg_key int)
|
||||
begin
|
||||
declare v_col1 int;
|
||||
declare v_col2 char(122);
|
||||
declare no_more_rows boolean ;
|
||||
declare cursor1 cursor for
|
||||
select p_partkey, p_name from part where p_partkey <= arg_key;
|
||||
declare continue handler for not found
|
||||
set no_more_rows := TRUE;
|
||||
set no_more_rows := false;
|
||||
open cursor1;
|
||||
LOOP1: loop
|
||||
fetch cursor1
|
||||
into v_col1, v_col2
|
||||
;
|
||||
if no_more_rows then
|
||||
close cursor1;
|
||||
leave LOOP1;
|
||||
end if;
|
||||
--
|
||||
select v_col1, v_col2;
|
||||
--
|
||||
end loop LOOP1;
|
||||
end$$
|
||||
|
||||
|
||||
drop procedure if exists sp_repeat_loop;
|
||||
|
||||
Create Procedure sp_repeat_loop(in arg_key int, in arg_key2 int)
|
||||
begin
|
||||
DECLARE done INT DEFAULT 0;
|
||||
DECLARE a CHAR(122);
|
||||
DECLARE b INT;
|
||||
DECLARE cur1
|
||||
CURSOR FOR
|
||||
SELECT p_partkey, p_name
|
||||
FROM part where p_partkey between arg_key and arg_key2;
|
||||
DECLARE
|
||||
CONTINUE HANDLER FOR
|
||||
SQLSTATE '02000'
|
||||
SET done = 1;
|
||||
|
||||
OPEN cur1;
|
||||
|
||||
REPEAT
|
||||
FETCH cur1 INTO b, a;
|
||||
if not done then
|
||||
select b, a;
|
||||
end if;
|
||||
UNTIL
|
||||
done
|
||||
END REPEAT;
|
||||
|
||||
CLOSE cur1;
|
||||
end$$
|
||||
|
||||
drop procedure if exists sp_while_loop;
|
||||
|
||||
Create Procedure sp_while_loop(in arg_key int, in arg_key2 int)
|
||||
begin
|
||||
DECLARE done INT DEFAULT 0;
|
||||
DECLARE a CHAR(116);
|
||||
DECLARE b INT;
|
||||
DECLARE cur1
|
||||
CURSOR FOR
|
||||
SELECT p_partkey, p_name
|
||||
FROM part where p_partkey between arg_key and arg_key2;
|
||||
DECLARE
|
||||
CONTINUE HANDLER FOR
|
||||
SQLSTATE '02000'
|
||||
SET done = 1;
|
||||
|
||||
OPEN cur1;
|
||||
|
||||
FETCH cur1 INTO b, a;
|
||||
WHILE NOT done DO
|
||||
if not done then
|
||||
select b, a;
|
||||
end if;
|
||||
FETCH cur1 INTO b, a;
|
||||
END WHILE;
|
||||
|
||||
CLOSE cur1;
|
||||
end$$
|
||||
|
||||
# SP with DDL
|
||||
drop procedure if exists proc1;
|
||||
|
||||
create procedure proc1()
|
||||
begin
|
||||
drop table if exists t1;
|
||||
create table if not exists t1 (id int)engine=columnstore;
|
||||
start transaction;
|
||||
alter table t1 add column c3 integer;
|
||||
insert into t1 values (1,2);
|
||||
select * into @a, @b from t1;
|
||||
drop table t1;
|
||||
commit;
|
||||
end$$
|
||||
|
||||
DELIMITER ;$$
|
||||
call sp_simple_select;
|
||||
call sp_simple_variable(2);
|
||||
call sp_simple_variables(10, 'AMERICA');
|
||||
call sp_complex_variable(1000, '1998-10-10');
|
||||
call sp_unstructured_loop(2);
|
||||
call sp_repeat_loop(1,2);
|
||||
call sp_while_loop(1,2);
|
||||
call proc1();
|
||||
select @a, @b;
|
||||
|
||||
--disable_warnings
|
||||
drop procedure sp_simple_select;
|
||||
drop procedure sp_simple_variable;
|
||||
drop procedure sp_simple_variables;
|
||||
drop procedure sp_complex_variable;
|
||||
drop procedure sp_unstructured_loop;
|
||||
drop procedure sp_repeat_loop;
|
||||
drop procedure sp_while_loop;
|
||||
drop procedure proc1;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
|
@ -1,179 +1,179 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1_compareLogOnly/partitionOptimization/aCreateViews.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
|
||||
--disable_warnings
|
||||
drop view if exists v_nation;
|
||||
drop view if exists v_region;
|
||||
drop view if exists v_customer;
|
||||
drop view if exists v_orders;
|
||||
drop view if exists v_supplier;
|
||||
drop view if exists v_partsupp;
|
||||
drop view if exists v_part;
|
||||
drop view if exists v_lineitem;
|
||||
--enable_warnings
|
||||
|
||||
create view v_nation as select * from nation where n_nationkey > 10 union all select * from nation where n_nationkey <= 10;
|
||||
create view v_region as select * from region where r_regionkey > 3 union all select * from region where r_regionkey <= 3;
|
||||
create view v_customer as select * from customer union all select * from customer where c_custkey=0;
|
||||
create view v_orders as select * from orders union all select * from orders where o_orderkey=0;
|
||||
create view v_supplier as select * from supplier union all select * from supplier where s_suppkey=0;
|
||||
create view v_partsupp as select * from partsupp union all select * from partsupp where ps_partkey=0;
|
||||
create view v_part as select * from part union all select * from part where p_partkey=0;
|
||||
create view v_lineitem as select * from lineitem union all select * from lineitem where l_orderkey=0;
|
||||
|
||||
|
||||
--disable_warnings
|
||||
drop procedure if exists ordersColumnsTouched;
|
||||
drop procedure if exists lineitemColumnsTouched;
|
||||
drop procedure if exists customerColumnsTouched;
|
||||
drop procedure if exists supplierColumnsTouched;
|
||||
drop procedure if exists partColumnsTouched;
|
||||
drop procedure if exists partsuppColumnsTouched;
|
||||
drop procedure if exists regionColumnsTouched;
|
||||
drop procedure if exists nationColumnsTouched;
|
||||
drop procedure if exists eliminatedBlocksGE;
|
||||
--enable_warnings
|
||||
|
||||
delimiter //;
|
||||
create procedure ordersColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('o_orderkey', trace) > 0 as o_orderkey_accessed;
|
||||
select locate('o_custkey', trace) > 0 as o_custkey_accessed;
|
||||
select locate('o_orderstatus', trace) > 0 as o_orderstatus_accessed;
|
||||
select locate('o_totalprice', trace) > 0 as o_totalprice_accessed;
|
||||
select locate('o_orderdate', trace) > 0 as o_orderdate_accessed;
|
||||
select locate('o_orderpriority', trace) > 0 as o_orderpriority_accessed;
|
||||
select locate('o_clerk', trace) > 0 as o_clerk_accessed;
|
||||
select locate('o_shippriority', trace) > 0 as o_shippriority_accessed;
|
||||
select locate('o_comment', trace) > 0 as o_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure lineitemColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('l_orderkey', trace) > 0 as l_orderkey_accessed;
|
||||
select locate('l_partkey', trace) > 0 as l_partkey_accessed;
|
||||
select locate('l_suppkey', trace) > 0 as l_suppkey_accessed;
|
||||
select locate('l_linenumber', trace) > 0 as l_linenumber_accessed;
|
||||
select locate('l_quantity', trace) > 0 as l_quantity_accessed;
|
||||
select locate('l_extendedprice', trace) > 0 as l_extendedprice_accessed;
|
||||
select locate('l_discount', trace) > 0 as l_discount_accessed;
|
||||
select locate('l_tax', trace) > 0 as l_tax_accessed;
|
||||
select locate('l_returnflag', trace) > 0 as l_returnflag_accessed;
|
||||
select locate('l_linestatus', trace) > 0 as l_linestatus_accessed;
|
||||
select locate('l_shipdate', trace) > 0 as l_shipdate_accessed;
|
||||
select locate('l_commitdate', trace) > 0 as l_commitdate_accessed;
|
||||
select locate('l_receiptdate', trace) > 0 as l_receiptdate_accessed;
|
||||
select locate('l_shipinstruct', trace) > 0 as l_shipinstruct_accessed;
|
||||
select locate('l_shipmode', trace) > 0 as l_shipmode_accessed;
|
||||
select locate('l_comment', trace) > 0 as l_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure customerColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('c_custkey', trace) > 0 as c_custkey_accessed;
|
||||
select locate('c_name', trace) > 0 as c_name_accessed;
|
||||
select locate('c_address', trace) > 0 as c_address_accessed;
|
||||
select locate('c_nationkey', trace) > 0 as c_nationkey_accessed;
|
||||
select locate('c_phone', trace) > 0 as c_phone_accessed;
|
||||
select locate('c_acctbal', trace) > 0 as c_acctbal_accessed;
|
||||
select locate('c_mktsegment', trace) > 0 as c_mktsegment_accessed;
|
||||
select locate('c_comment', trace) > 0 as c_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure partColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('p_partkey', trace) > 0 as p_partkey_accessed;
|
||||
select locate('p_name', trace) > 0 as p_name_accessed;
|
||||
select locate('p_mfgr', trace) > 0 as p_mfgr_accessed;
|
||||
select locate('p_brand', trace) > 0 as p_brand_accessed;
|
||||
select locate('p_type', trace) > 0 as p_type_accessed;
|
||||
select locate('p_size', trace) > 0 as p_size_accessed;
|
||||
select locate('p_container', trace) > 0 as p_container_accessed;
|
||||
select locate('p_retailprice', trace) > 0 as p_retailprice_accessed;
|
||||
select locate('p_comment', trace) > 0 as p_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure partsuppColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('ps_partkey', trace) > 0 as ps_partkey_accessed;
|
||||
select locate('ps_suppkey', trace) > 0 as ps_suppkey_accessed;
|
||||
select locate('ps_availqty', trace) > 0 as ps_availqty_accessed;
|
||||
select locate('ps_supplycost', trace) > 0 as ps_supplycost_accessed;
|
||||
select locate('ps_comment', trace) > 0 as ps_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure supplierColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('s_suppkey', trace) > 0 as s_suppkey_accessed;
|
||||
select locate('s_name', trace) > 0 as s_name_accessed;
|
||||
select locate('s_address', trace) > 0 as s_address_accessed;
|
||||
select locate('s_nationkey', trace) > 0 as s_nationkey_accessed;
|
||||
select locate('s_phone', trace) > 0 as s_phone_accessed;
|
||||
select locate('s_acctbal', trace) > 0 as s_acctbal_accessed;
|
||||
select locate('s_comment', trace) > 0 as s_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure nationColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('n_nationkey', trace) > 0 as n_nationkey_accessed;
|
||||
select locate('n_name', trace) > 0 as n_name_accessed;
|
||||
select locate('n_regionkey', trace) > 0 as n_regionkey_accessed;
|
||||
select locate('n_comment', trace) > 0 as n_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure regionColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('r_regionkey', trace) > 0 as r_regionkey_accessed;
|
||||
select locate('r_name', trace) > 0 as r_name_accessed;
|
||||
select locate('r_comment', trace) > 0 as r_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure eliminatedBlocksGE(in blocks int) BEGIN
|
||||
select calgetstats() into @stats;
|
||||
select substr(@stats, locate('PartitionBlocksEliminated', @stats)+26, 999) into @temp;
|
||||
select substr(@temp, 1, locate(';', @temp)-1) into @blocksEliminated;
|
||||
select concat('Blocks eliminated ', if(@blocksEliminated >= blocks, 'is ', 'is not '), 'greater than or equal to ', blocks, '.') as 'CP Result';
|
||||
END //
|
||||
delimiter ;//
|
||||
|
||||
select count(*) as lineitem_count from lineitem;
|
||||
select count(*) as v_lineitem_count from v_lineitem;
|
||||
select count(*) as orders_count from orders;
|
||||
select count(*) as v_orders_count from v_orders;
|
||||
select count(*) as part_count from part;
|
||||
select count(*) as v_part_count from v_part;
|
||||
select count(*) as partsupp_count from partsupp;
|
||||
select count(*) as v_partsupp_count from v_partsupp;
|
||||
select count(*) as customer_count from customer;
|
||||
select count(*) as v_customer_count from v_customer;
|
||||
select count(*) as supplier_count from supplier;
|
||||
select count(*) as v_supplier_count from v_supplier;
|
||||
select count(*) as region_count from region;
|
||||
select count(*) as v_region_count from v_region;
|
||||
select count(*) as nation_count from nation;
|
||||
select count(*) as v_nation_count from v_nation;
|
||||
|
||||
# Clean up
|
||||
--disable_warnings
|
||||
drop view if exists v_nation;
|
||||
drop view if exists v_region;
|
||||
drop view if exists v_customer;
|
||||
drop view if exists v_orders;
|
||||
drop view if exists v_supplier;
|
||||
drop view if exists v_partsupp;
|
||||
drop view if exists v_part;
|
||||
drop view if exists v_lineitem;
|
||||
#
|
||||
drop procedure if exists ordersColumnsTouched;
|
||||
drop procedure if exists lineitemColumnsTouched;
|
||||
drop procedure if exists customerColumnsTouched;
|
||||
drop procedure if exists supplierColumnsTouched;
|
||||
drop procedure if exists partColumnsTouched;
|
||||
drop procedure if exists partsuppColumnsTouched;
|
||||
drop procedure if exists regionColumnsTouched;
|
||||
drop procedure if exists nationColumnsTouched;
|
||||
drop procedure if exists eliminatedBlocksGE;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1_compareLogOnly/partitionOptimization/aCreateViews.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
|
||||
--disable_warnings
|
||||
drop view if exists v_nation;
|
||||
drop view if exists v_region;
|
||||
drop view if exists v_customer;
|
||||
drop view if exists v_orders;
|
||||
drop view if exists v_supplier;
|
||||
drop view if exists v_partsupp;
|
||||
drop view if exists v_part;
|
||||
drop view if exists v_lineitem;
|
||||
--enable_warnings
|
||||
|
||||
create view v_nation as select * from nation where n_nationkey > 10 union all select * from nation where n_nationkey <= 10;
|
||||
create view v_region as select * from region where r_regionkey > 3 union all select * from region where r_regionkey <= 3;
|
||||
create view v_customer as select * from customer union all select * from customer where c_custkey=0;
|
||||
create view v_orders as select * from orders union all select * from orders where o_orderkey=0;
|
||||
create view v_supplier as select * from supplier union all select * from supplier where s_suppkey=0;
|
||||
create view v_partsupp as select * from partsupp union all select * from partsupp where ps_partkey=0;
|
||||
create view v_part as select * from part union all select * from part where p_partkey=0;
|
||||
create view v_lineitem as select * from lineitem union all select * from lineitem where l_orderkey=0;
|
||||
|
||||
|
||||
--disable_warnings
|
||||
drop procedure if exists ordersColumnsTouched;
|
||||
drop procedure if exists lineitemColumnsTouched;
|
||||
drop procedure if exists customerColumnsTouched;
|
||||
drop procedure if exists supplierColumnsTouched;
|
||||
drop procedure if exists partColumnsTouched;
|
||||
drop procedure if exists partsuppColumnsTouched;
|
||||
drop procedure if exists regionColumnsTouched;
|
||||
drop procedure if exists nationColumnsTouched;
|
||||
drop procedure if exists eliminatedBlocksGE;
|
||||
--enable_warnings
|
||||
|
||||
delimiter //;
|
||||
create procedure ordersColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('o_orderkey', trace) > 0 as o_orderkey_accessed;
|
||||
select locate('o_custkey', trace) > 0 as o_custkey_accessed;
|
||||
select locate('o_orderstatus', trace) > 0 as o_orderstatus_accessed;
|
||||
select locate('o_totalprice', trace) > 0 as o_totalprice_accessed;
|
||||
select locate('o_orderdate', trace) > 0 as o_orderdate_accessed;
|
||||
select locate('o_orderpriority', trace) > 0 as o_orderpriority_accessed;
|
||||
select locate('o_clerk', trace) > 0 as o_clerk_accessed;
|
||||
select locate('o_shippriority', trace) > 0 as o_shippriority_accessed;
|
||||
select locate('o_comment', trace) > 0 as o_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure lineitemColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('l_orderkey', trace) > 0 as l_orderkey_accessed;
|
||||
select locate('l_partkey', trace) > 0 as l_partkey_accessed;
|
||||
select locate('l_suppkey', trace) > 0 as l_suppkey_accessed;
|
||||
select locate('l_linenumber', trace) > 0 as l_linenumber_accessed;
|
||||
select locate('l_quantity', trace) > 0 as l_quantity_accessed;
|
||||
select locate('l_extendedprice', trace) > 0 as l_extendedprice_accessed;
|
||||
select locate('l_discount', trace) > 0 as l_discount_accessed;
|
||||
select locate('l_tax', trace) > 0 as l_tax_accessed;
|
||||
select locate('l_returnflag', trace) > 0 as l_returnflag_accessed;
|
||||
select locate('l_linestatus', trace) > 0 as l_linestatus_accessed;
|
||||
select locate('l_shipdate', trace) > 0 as l_shipdate_accessed;
|
||||
select locate('l_commitdate', trace) > 0 as l_commitdate_accessed;
|
||||
select locate('l_receiptdate', trace) > 0 as l_receiptdate_accessed;
|
||||
select locate('l_shipinstruct', trace) > 0 as l_shipinstruct_accessed;
|
||||
select locate('l_shipmode', trace) > 0 as l_shipmode_accessed;
|
||||
select locate('l_comment', trace) > 0 as l_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure customerColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('c_custkey', trace) > 0 as c_custkey_accessed;
|
||||
select locate('c_name', trace) > 0 as c_name_accessed;
|
||||
select locate('c_address', trace) > 0 as c_address_accessed;
|
||||
select locate('c_nationkey', trace) > 0 as c_nationkey_accessed;
|
||||
select locate('c_phone', trace) > 0 as c_phone_accessed;
|
||||
select locate('c_acctbal', trace) > 0 as c_acctbal_accessed;
|
||||
select locate('c_mktsegment', trace) > 0 as c_mktsegment_accessed;
|
||||
select locate('c_comment', trace) > 0 as c_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure partColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('p_partkey', trace) > 0 as p_partkey_accessed;
|
||||
select locate('p_name', trace) > 0 as p_name_accessed;
|
||||
select locate('p_mfgr', trace) > 0 as p_mfgr_accessed;
|
||||
select locate('p_brand', trace) > 0 as p_brand_accessed;
|
||||
select locate('p_type', trace) > 0 as p_type_accessed;
|
||||
select locate('p_size', trace) > 0 as p_size_accessed;
|
||||
select locate('p_container', trace) > 0 as p_container_accessed;
|
||||
select locate('p_retailprice', trace) > 0 as p_retailprice_accessed;
|
||||
select locate('p_comment', trace) > 0 as p_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure partsuppColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('ps_partkey', trace) > 0 as ps_partkey_accessed;
|
||||
select locate('ps_suppkey', trace) > 0 as ps_suppkey_accessed;
|
||||
select locate('ps_availqty', trace) > 0 as ps_availqty_accessed;
|
||||
select locate('ps_supplycost', trace) > 0 as ps_supplycost_accessed;
|
||||
select locate('ps_comment', trace) > 0 as ps_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure supplierColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('s_suppkey', trace) > 0 as s_suppkey_accessed;
|
||||
select locate('s_name', trace) > 0 as s_name_accessed;
|
||||
select locate('s_address', trace) > 0 as s_address_accessed;
|
||||
select locate('s_nationkey', trace) > 0 as s_nationkey_accessed;
|
||||
select locate('s_phone', trace) > 0 as s_phone_accessed;
|
||||
select locate('s_acctbal', trace) > 0 as s_acctbal_accessed;
|
||||
select locate('s_comment', trace) > 0 as s_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure nationColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('n_nationkey', trace) > 0 as n_nationkey_accessed;
|
||||
select locate('n_name', trace) > 0 as n_name_accessed;
|
||||
select locate('n_regionkey', trace) > 0 as n_regionkey_accessed;
|
||||
select locate('n_comment', trace) > 0 as n_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure regionColumnsTouched (in trace varchar(10000)) BEGIN
|
||||
select locate('r_regionkey', trace) > 0 as r_regionkey_accessed;
|
||||
select locate('r_name', trace) > 0 as r_name_accessed;
|
||||
select locate('r_comment', trace) > 0 as r_comment_accessed;
|
||||
END //
|
||||
|
||||
create procedure eliminatedBlocksGE(in blocks int) BEGIN
|
||||
select calgetstats() into @stats;
|
||||
select substr(@stats, locate('PartitionBlocksEliminated', @stats)+26, 999) into @temp;
|
||||
select substr(@temp, 1, locate(';', @temp)-1) into @blocksEliminated;
|
||||
select concat('Blocks eliminated ', if(@blocksEliminated >= blocks, 'is ', 'is not '), 'greater than or equal to ', blocks, '.') as 'CP Result';
|
||||
END //
|
||||
delimiter ;//
|
||||
|
||||
select count(*) as lineitem_count from lineitem;
|
||||
select count(*) as v_lineitem_count from v_lineitem;
|
||||
select count(*) as orders_count from orders;
|
||||
select count(*) as v_orders_count from v_orders;
|
||||
select count(*) as part_count from part;
|
||||
select count(*) as v_part_count from v_part;
|
||||
select count(*) as partsupp_count from partsupp;
|
||||
select count(*) as v_partsupp_count from v_partsupp;
|
||||
select count(*) as customer_count from customer;
|
||||
select count(*) as v_customer_count from v_customer;
|
||||
select count(*) as supplier_count from supplier;
|
||||
select count(*) as v_supplier_count from v_supplier;
|
||||
select count(*) as region_count from region;
|
||||
select count(*) as v_region_count from v_region;
|
||||
select count(*) as nation_count from nation;
|
||||
select count(*) as v_nation_count from v_nation;
|
||||
|
||||
# Clean up
|
||||
--disable_warnings
|
||||
drop view if exists v_nation;
|
||||
drop view if exists v_region;
|
||||
drop view if exists v_customer;
|
||||
drop view if exists v_orders;
|
||||
drop view if exists v_supplier;
|
||||
drop view if exists v_partsupp;
|
||||
drop view if exists v_part;
|
||||
drop view if exists v_lineitem;
|
||||
#
|
||||
drop procedure if exists ordersColumnsTouched;
|
||||
drop procedure if exists lineitemColumnsTouched;
|
||||
drop procedure if exists customerColumnsTouched;
|
||||
drop procedure if exists supplierColumnsTouched;
|
||||
drop procedure if exists partColumnsTouched;
|
||||
drop procedure if exists partsuppColumnsTouched;
|
||||
drop procedure if exists regionColumnsTouched;
|
||||
drop procedure if exists nationColumnsTouched;
|
||||
drop procedure if exists eliminatedBlocksGE;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
|
@ -1,40 +1,40 @@
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/view/view_sp.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
# VIEW used by Stored Procedure
|
||||
create or replace view v_temp as select * from part where p_partkey<10;
|
||||
DELIMITER $$;
|
||||
drop procedure if exists sp_simple_select;
|
||||
Create Procedure sp_simple_select( )
|
||||
begin
|
||||
select * from v_temp where p_partkey < 5;
|
||||
end $$
|
||||
|
||||
# Simple SP with 1 arg
|
||||
drop procedure if exists sp_simple_variable;
|
||||
|
||||
Create Procedure sp_simple_variable(in arg_key int)
|
||||
begin
|
||||
select * from v_temp where p_partkey <= arg_key;
|
||||
end $$
|
||||
DELIMITER ;$$
|
||||
|
||||
call sp_simple_select;
|
||||
call sp_simple_variable(2);
|
||||
|
||||
--disable_warnings
|
||||
drop procedure sp_simple_select;
|
||||
drop procedure sp_simple_variable;
|
||||
drop view v_temp;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/view/view_sp.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
# VIEW used by Stored Procedure
|
||||
create or replace view v_temp as select * from part where p_partkey<10;
|
||||
DELIMITER $$;
|
||||
drop procedure if exists sp_simple_select;
|
||||
Create Procedure sp_simple_select( )
|
||||
begin
|
||||
select * from v_temp where p_partkey < 5;
|
||||
end $$
|
||||
|
||||
# Simple SP with 1 arg
|
||||
drop procedure if exists sp_simple_variable;
|
||||
|
||||
Create Procedure sp_simple_variable(in arg_key int)
|
||||
begin
|
||||
select * from v_temp where p_partkey <= arg_key;
|
||||
end $$
|
||||
DELIMITER ;$$
|
||||
|
||||
call sp_simple_select;
|
||||
call sp_simple_variable(2);
|
||||
|
||||
--disable_warnings
|
||||
drop procedure sp_simple_select;
|
||||
drop procedure sp_simple_variable;
|
||||
drop view v_temp;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
|
@ -1,34 +1,34 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/misc/MCOL-829.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
# Support INSERT...SELECT in stored procedures
|
||||
--disable_warnings
|
||||
drop table if exists mcol829a;
|
||||
drop table if exists mcol829b;
|
||||
drop procedure if exists mcol829;
|
||||
--enable_warnings
|
||||
|
||||
create table mcol829a (a int, b int) engine=columnstore;
|
||||
create table mcol829b (a int, b int) engine=columnstore;
|
||||
insert into mcol829a values (1,1),(2,2),(3,3);
|
||||
delimiter //;
|
||||
create procedure mcol829() begin insert into mcol829b select * from mcol829a; end//
|
||||
delimiter ;//
|
||||
call mcol829();
|
||||
select * from mcol829b;
|
||||
|
||||
--disable_warnings
|
||||
drop procedure mcol829;
|
||||
drop table mcol829a;
|
||||
drop table mcol829b;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/misc/MCOL-829.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
# Support INSERT...SELECT in stored procedures
|
||||
--disable_warnings
|
||||
drop table if exists mcol829a;
|
||||
drop table if exists mcol829b;
|
||||
drop procedure if exists mcol829;
|
||||
--enable_warnings
|
||||
|
||||
create table mcol829a (a int, b int) engine=columnstore;
|
||||
create table mcol829b (a int, b int) engine=columnstore;
|
||||
insert into mcol829a values (1,1),(2,2),(3,3);
|
||||
delimiter //;
|
||||
create procedure mcol829() begin insert into mcol829b select * from mcol829a; end//
|
||||
delimiter ;//
|
||||
call mcol829();
|
||||
select * from mcol829b;
|
||||
|
||||
--disable_warnings
|
||||
drop procedure mcol829;
|
||||
drop table mcol829a;
|
||||
drop table mcol829b;
|
||||
--enable_warnings
|
||||
#
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.1.1.1.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select max(l_shipdate), min(l_orderkey), sum(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.1.1.1.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select max(l_shipdate), min(l_orderkey), sum(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
|
@ -1,13 +1,13 @@
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.1.1.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select * from lineitem where l_orderkey < 1400 order by l_orderkey, l_linenumber;
|
||||
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.1.1.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select * from lineitem where l_orderkey < 1400 order by l_orderkey, l_linenumber;
|
||||
|
@ -1,15 +1,15 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.2.1.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select count(*) from part, lineitem
|
||||
where p_retailprice < 944.23
|
||||
and p_partkey = l_suppkey
|
||||
and l_shipdate < '1992-04-09';
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.2.1.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select count(*) from part, lineitem
|
||||
where p_retailprice < 944.23
|
||||
and p_partkey = l_suppkey
|
||||
and l_shipdate < '1992-04-09';
|
||||
|
@ -1,15 +1,15 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.2.1.3.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select count(*) from part, lineitem
|
||||
where p_retailprice < 904.01
|
||||
and p_partkey = l_suppkey
|
||||
and l_shipdate < '1993-04-07';
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.2.1.3.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select count(*) from part, lineitem
|
||||
where p_retailprice < 904.01
|
||||
and p_partkey = l_suppkey
|
||||
and l_shipdate < '1993-04-07';
|
||||
|
@ -1,15 +1,15 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.2.1.4.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select count(*) from part, lineitem
|
||||
where p_retailprice < 913.65
|
||||
and p_partkey = l_suppkey
|
||||
and l_shipdate < '1993-04-07';
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.2.1.4.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select count(*) from part, lineitem
|
||||
where p_retailprice < 913.65
|
||||
and p_partkey = l_suppkey
|
||||
and l_shipdate < '1993-04-07';
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.4.1.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select min(l_suppkey) from lineitem;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.4.1.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select min(l_suppkey) from lineitem;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.4.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select max(l_shipdate) from lineitem;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.4.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select max(l_shipdate) from lineitem;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.4.3.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select sum(l_orderkey) from lineitem where l_suppkey < 100000;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.4.3.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select sum(l_orderkey) from lineitem where l_suppkey < 100000;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.4.4.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select avg(l_extendedprice) from lineitem;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.4.4.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select avg(l_extendedprice) from lineitem;
|
||||
|
@ -1,19 +1,19 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.6.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select p_brand, sum(l_quantity) tot_qty,
|
||||
avg(l_quantity) avg_qty, count(*)
|
||||
from part, lineitem
|
||||
where l_shipdate between '1996-04-01' and '1996-04-14'
|
||||
and p_size = 5
|
||||
and p_partkey = l_partkey
|
||||
group by p_brand
|
||||
order by 1;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q2.3.6.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select p_brand, sum(l_quantity) tot_qty,
|
||||
avg(l_quantity) avg_qty, count(*)
|
||||
from part, lineitem
|
||||
where l_shipdate between '1996-04-01' and '1996-04-14'
|
||||
and p_size = 5
|
||||
and p_partkey = l_partkey
|
||||
group by p_brand
|
||||
order by 1;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select max(l_shipdate), count(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select max(l_shipdate), count(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.4.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select o_orderdate, o_custkey from orders,lineitem where o_custkey < 100 and o_orderkey = l_orderkey order by 1, 2;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.4.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select o_orderdate, o_custkey from orders,lineitem where o_custkey < 100 and o_orderkey = l_orderkey order by 1, 2;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.6.1.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select c_custkey, o_orderkey from customer left outer join orders on c_custkey = o_custkey where c_custkey < 1000 and c_nationkey = 4 order by 1, 2;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.6.1.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select c_custkey, o_orderkey from customer left outer join orders on c_custkey = o_custkey where c_custkey < 1000 and c_nationkey = 4 order by 1, 2;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.6.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select c_custkey, o_orderkey from orders right outer join customer on c_custkey = o_custkey where c_custkey < 1000 and c_nationkey = 4 order by 1, 2;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.6.2.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select c_custkey, o_orderkey from orders right outer join customer on c_custkey = o_custkey where c_custkey < 1000 and c_nationkey = 4 order by 1, 2;
|
||||
|
@ -1,12 +1,12 @@
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.6.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select * from lineitem, orders where o_custkey < 1000 and l_partkey < 10000 and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;
|
||||
#
|
||||
# Test case migrated from regression test suite:
|
||||
# queries/working_tpch1/group/q4.6.sql
|
||||
#
|
||||
# Author: Susil, susil.behera@mariadb.com
|
||||
#
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select * from lineitem, orders where o_custkey < 1000 and l_partkey < 10000 and l_orderkey = o_orderkey order by l_orderkey, l_linenumber;
|
||||
|
@ -9,4 +9,4 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select * from lineitem where l_orderkey = 6000000000 order by l_orderkey, l_linenumber;
|
||||
select * from lineitem where l_orderkey = 6000000000 order by l_orderkey, l_linenumber;
|
||||
|
@ -9,5 +9,5 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select l_shipdate, l_suppkey, l_quantity, l_extendedprice, l_comment
|
||||
from lineitem where l_orderkey = 6000000000 order by 1, 2, 3, 4, 5;
|
||||
select l_shipdate, l_suppkey, l_quantity, l_extendedprice, l_comment
|
||||
from lineitem where l_orderkey = 6000000000 order by 1, 2, 3, 4, 5;
|
||||
|
@ -9,4 +9,4 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select max(l_shipdate), min(l_orderkey), sum(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
Select max(l_shipdate), min(l_orderkey), sum(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
|
@ -9,4 +9,4 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select max(l_shipdate), count(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
select max(l_shipdate), count(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
|
@ -9,4 +9,4 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select * from lineitem where l_orderkey = 6000000000 order by l_orderkey, l_linenumber;
|
||||
select * from lineitem where l_orderkey = 6000000000 order by l_orderkey, l_linenumber;
|
||||
|
@ -9,5 +9,5 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select l_shipdate, l_suppkey, l_quantity, l_extendedprice, l_comment
|
||||
from lineitem where l_orderkey = 6000000000 order by 1, 2, 3, 4, 5;
|
||||
select l_shipdate, l_suppkey, l_quantity, l_extendedprice, l_comment
|
||||
from lineitem where l_orderkey = 6000000000 order by 1, 2, 3, 4, 5;
|
||||
|
@ -9,4 +9,4 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select max(l_shipdate), count(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
select max(l_shipdate), count(l_partkey) from lineitem where l_orderkey < 1000000;
|
||||
|
@ -9,4 +9,4 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
Select /* ! INFINIDB_ORDERED */ min(o_orderdate), max(o_custkey) from orders, lineitem where l_partkey < 100000 and l_orderkey = o_orderkey;
|
||||
Select /* ! INFINIDB_ORDERED */ min(o_orderdate), max(o_custkey) from orders, lineitem where l_partkey < 100000 and l_orderkey = o_orderkey;
|
||||
|
@ -9,4 +9,4 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select * from lineitem where l_orderkey = 6000000000 order by l_orderkey, l_linenumber;
|
||||
select * from lineitem where l_orderkey = 6000000000 order by l_orderkey, l_linenumber;
|
||||
|
@ -9,5 +9,5 @@
|
||||
|
||||
USE tpch1;
|
||||
|
||||
select l_shipdate, l_suppkey, l_quantity, l_extendedprice, l_comment
|
||||
from lineitem where l_orderkey = 6000000000 order by 1, 2, 3, 4, 5;
|
||||
select l_shipdate, l_suppkey, l_quantity, l_extendedprice, l_comment
|
||||
from lineitem where l_orderkey = 6000000000 order by 1, 2, 3, 4, 5;
|
||||
|
@ -8,12 +8,12 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q1.3
|
||||
select sum(lo_extendedprice*lo_discount) as revenue
|
||||
from dateinfo, lineorder # changed order
|
||||
where lo_orderdate = d_datekey
|
||||
and d_weeknuminyear = 6
|
||||
and d_year = 1994
|
||||
and lo_orderdate between 19940101 and 19941231 # added matching predicate
|
||||
and lo_discount between 5 and 7
|
||||
and lo_quantity between 26 and 35;
|
||||
# Q1.3
|
||||
select sum(lo_extendedprice*lo_discount) as revenue
|
||||
from dateinfo, lineorder # changed order
|
||||
where lo_orderdate = d_datekey
|
||||
and d_weeknuminyear = 6
|
||||
and d_year = 1994
|
||||
and lo_orderdate between 19940101 and 19941231 # added matching predicate
|
||||
and lo_discount between 5 and 7
|
||||
and lo_quantity between 26 and 35;
|
||||
|
@ -8,13 +8,13 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q2.1
|
||||
select sum(lo_revenue), d_year, p_brand1
|
||||
from part, supplier, dateinfo, lineorder # changed order
|
||||
where lo_orderdate = d_datekey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and p_category = 'MFGR#12'
|
||||
and s_region = 'AMERICA'
|
||||
group by d_year, p_brand1
|
||||
order by d_year, p_brand1;
|
||||
# Q2.1
|
||||
select sum(lo_revenue), d_year, p_brand1
|
||||
from part, supplier, dateinfo, lineorder # changed order
|
||||
where lo_orderdate = d_datekey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and p_category = 'MFGR#12'
|
||||
and s_region = 'AMERICA'
|
||||
group by d_year, p_brand1
|
||||
order by d_year, p_brand1;
|
||||
|
@ -8,14 +8,14 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q2.2
|
||||
select sum(lo_revenue), d_year, p_brand1
|
||||
from part, supplier, dateinfo, lineorder # changed order
|
||||
where lo_orderdate = d_datekey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and p_brand1 between 'MFGR#2221'
|
||||
and 'MFGR#2228'
|
||||
and s_region = 'ASIA'
|
||||
group by d_year, p_brand1
|
||||
order by d_year, p_brand1;
|
||||
# Q2.2
|
||||
select sum(lo_revenue), d_year, p_brand1
|
||||
from part, supplier, dateinfo, lineorder # changed order
|
||||
where lo_orderdate = d_datekey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and p_brand1 between 'MFGR#2221'
|
||||
and 'MFGR#2228'
|
||||
and s_region = 'ASIA'
|
||||
group by d_year, p_brand1
|
||||
order by d_year, p_brand1;
|
||||
|
@ -8,13 +8,13 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q2.3
|
||||
select sum(lo_revenue), d_year, p_brand1
|
||||
from part, supplier, dateinfo, lineorder # changed order
|
||||
where lo_orderdate = d_datekey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and p_brand1= 'MFGR#2239'
|
||||
and s_region = 'EUROPE'
|
||||
group by d_year, p_brand1
|
||||
order by d_year, p_brand1;
|
||||
# Q2.3
|
||||
select sum(lo_revenue), d_year, p_brand1
|
||||
from part, supplier, dateinfo, lineorder # changed order
|
||||
where lo_orderdate = d_datekey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and p_brand1= 'MFGR#2239'
|
||||
and s_region = 'EUROPE'
|
||||
group by d_year, p_brand1
|
||||
order by d_year, p_brand1;
|
||||
|
@ -8,15 +8,15 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q3.1
|
||||
select c_nation, s_nation, d_year,
|
||||
sum(lo_revenue) as revenue
|
||||
from customer, supplier, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_orderdate = d_datekey
|
||||
and c_region = 'ASIA'
|
||||
and s_region = 'ASIA'
|
||||
and d_year >= 1992 and d_year <= 1997
|
||||
group by c_nation, s_nation, d_year
|
||||
order by d_year asc, revenue desc;
|
||||
# Q3.1
|
||||
select c_nation, s_nation, d_year,
|
||||
sum(lo_revenue) as revenue
|
||||
from customer, supplier, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_orderdate = d_datekey
|
||||
and c_region = 'ASIA'
|
||||
and s_region = 'ASIA'
|
||||
and d_year >= 1992 and d_year <= 1997
|
||||
group by c_nation, s_nation, d_year
|
||||
order by d_year asc, revenue desc;
|
||||
|
@ -8,15 +8,15 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q3.2
|
||||
select c_city, s_city, d_year, sum(lo_revenue)
|
||||
as revenue
|
||||
from customer, supplier, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_orderdate = d_datekey
|
||||
and c_nation = 'UNITED STATES'
|
||||
and s_nation = 'UNITED STATES'
|
||||
and d_year >= 1992 and d_year <= 1997
|
||||
group by c_city, s_city, d_year
|
||||
order by d_year asc, revenue desc;
|
||||
# Q3.2
|
||||
select c_city, s_city, d_year, sum(lo_revenue)
|
||||
as revenue
|
||||
from customer, supplier, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_orderdate = d_datekey
|
||||
and c_nation = 'UNITED STATES'
|
||||
and s_nation = 'UNITED STATES'
|
||||
and d_year >= 1992 and d_year <= 1997
|
||||
group by c_city, s_city, d_year
|
||||
order by d_year asc, revenue desc;
|
||||
|
@ -8,17 +8,17 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q3.3
|
||||
select c_city, s_city, d_year, sum(lo_revenue)
|
||||
as revenue
|
||||
from customer, supplier, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_orderdate = d_datekey
|
||||
and (c_city='UNITED KI1'
|
||||
or c_city='UNITED KI5')
|
||||
and (s_city='UNITED KI1'
|
||||
or s_city='UNITED KI5')
|
||||
and d_year >= 1992 and d_year <= 1997
|
||||
group by c_city, s_city, d_year
|
||||
order by d_year asc, revenue desc;
|
||||
# Q3.3
|
||||
select c_city, s_city, d_year, sum(lo_revenue)
|
||||
as revenue
|
||||
from customer, supplier, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_orderdate = d_datekey
|
||||
and (c_city='UNITED KI1'
|
||||
or c_city='UNITED KI5')
|
||||
and (s_city='UNITED KI1'
|
||||
or s_city='UNITED KI5')
|
||||
and d_year >= 1992 and d_year <= 1997
|
||||
group by c_city, s_city, d_year
|
||||
order by d_year asc, revenue desc;
|
||||
|
@ -8,18 +8,18 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q3.4
|
||||
select c_city, s_city, d_year, sum(lo_revenue)
|
||||
as revenue
|
||||
from dateinfo, customer,supplier, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_orderdate = d_datekey
|
||||
and (c_city='UNITED KI1'
|
||||
or c_city='UNITED KI5')
|
||||
and (s_city='UNITED KI1'
|
||||
or s_city='UNITED KI5')
|
||||
and d_yearmonth = 'Dec1997'
|
||||
and lo_orderdate between 19971201 and 19971231 # added matching predicate
|
||||
group by c_city, s_city, d_year
|
||||
order by d_year asc, revenue desc, c_city, s_city;
|
||||
# Q3.4
|
||||
select c_city, s_city, d_year, sum(lo_revenue)
|
||||
as revenue
|
||||
from dateinfo, customer,supplier, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_orderdate = d_datekey
|
||||
and (c_city='UNITED KI1'
|
||||
or c_city='UNITED KI5')
|
||||
and (s_city='UNITED KI1'
|
||||
or s_city='UNITED KI5')
|
||||
and d_yearmonth = 'Dec1997'
|
||||
and lo_orderdate between 19971201 and 19971231 # added matching predicate
|
||||
group by c_city, s_city, d_year
|
||||
order by d_year asc, revenue desc, c_city, s_city;
|
||||
|
@ -8,17 +8,17 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q4.1
|
||||
select d_year, c_nation,
|
||||
sum(lo_revenue - lo_supplycost) as profit
|
||||
from customer, supplier, part, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_orderdate = d_datekey
|
||||
and c_region = 'AMERICA'
|
||||
and s_region = 'AMERICA'
|
||||
and (p_mfgr = 'MFGR#1'
|
||||
or p_mfgr = 'MFGR#2')
|
||||
group by d_year, c_nation
|
||||
order by d_year, c_nation;
|
||||
# Q4.1
|
||||
select d_year, c_nation,
|
||||
sum(lo_revenue - lo_supplycost) as profit
|
||||
from customer, supplier, part, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_orderdate = d_datekey
|
||||
and c_region = 'AMERICA'
|
||||
and s_region = 'AMERICA'
|
||||
and (p_mfgr = 'MFGR#1'
|
||||
or p_mfgr = 'MFGR#2')
|
||||
group by d_year, c_nation
|
||||
order by d_year, c_nation;
|
||||
|
@ -8,20 +8,20 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q4.2
|
||||
select d_year, s_nation, p_category,
|
||||
sum(lo_revenue - lo_supplycost) as profit
|
||||
from customer, supplier, part, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_orderdate = d_datekey
|
||||
and c_region = 'AMERICA'
|
||||
and s_region = 'AMERICA'
|
||||
and (d_year = 1997 or d_year = 1998)
|
||||
and lo_orderdate between 19970101 and 19981231 # added matching predicate
|
||||
and (p_mfgr = 'MFGR#1'
|
||||
or p_mfgr = 'MFGR#2')
|
||||
group by d_year, s_nation, p_category
|
||||
order by d_year, s_nation, p_category;
|
||||
|
||||
# Q4.2
|
||||
select d_year, s_nation, p_category,
|
||||
sum(lo_revenue - lo_supplycost) as profit
|
||||
from customer, supplier, part, dateinfo, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_orderdate = d_datekey
|
||||
and c_region = 'AMERICA'
|
||||
and s_region = 'AMERICA'
|
||||
and (d_year = 1997 or d_year = 1998)
|
||||
and lo_orderdate between 19970101 and 19981231 # added matching predicate
|
||||
and (p_mfgr = 'MFGR#1'
|
||||
or p_mfgr = 'MFGR#2')
|
||||
group by d_year, s_nation, p_category
|
||||
order by d_year, s_nation, p_category;
|
||||
|
||||
|
@ -8,18 +8,18 @@
|
||||
-- source ../include/have_columnstore.inc
|
||||
|
||||
USE ssb1;
|
||||
# Q4.3
|
||||
select d_year, s_city, p_brand1,
|
||||
sum(lo_revenue - lo_supplycost) as profit
|
||||
from supplier, dateinfo, part, customer, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_orderdate = d_datekey
|
||||
and s_nation = 'UNITED STATES'
|
||||
and (d_year = 1997 or d_year = 1998)
|
||||
and lo_orderdate between 19970101 and 19981231 # added matching predicate
|
||||
and p_category = 'MFGR#14'
|
||||
group by d_year, s_city, p_brand1
|
||||
order by d_year, s_city, p_brand1;
|
||||
|
||||
# Q4.3
|
||||
select d_year, s_city, p_brand1,
|
||||
sum(lo_revenue - lo_supplycost) as profit
|
||||
from supplier, dateinfo, part, customer, lineorder # changed order
|
||||
where lo_custkey = c_custkey
|
||||
and lo_suppkey = s_suppkey
|
||||
and lo_partkey = p_partkey
|
||||
and lo_orderdate = d_datekey
|
||||
and s_nation = 'UNITED STATES'
|
||||
and (d_year = 1997 or d_year = 1998)
|
||||
and lo_orderdate between 19970101 and 19981231 # added matching predicate
|
||||
and p_category = 'MFGR#14'
|
||||
group by d_year, s_city, p_brand1
|
||||
order by d_year, s_city, p_brand1;
|
||||
|
||||
|
@ -1,103 +1,103 @@
|
||||
#!/usr/bin/perl -w
|
||||
print STDOUT "Enter the data size you want(Giga): ";
|
||||
$size=<STDIN>;
|
||||
unlink "region.tbl", "nation.tbl","supplier.tbl", "part.tbl","customer.tbl", "partsupp.tbl", "orders.tbl", "lineitem.tbl" ;
|
||||
print STDOUT "Generating data sets ...\n";
|
||||
system "./dbgen -s $size";
|
||||
print STDOUT "Converting to Calpont format ...\n";
|
||||
open(REGION, "<region.tbl") or die "Can't open region.tbl";
|
||||
open(REGION1, ">region1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <REGION> )
|
||||
{
|
||||
#!/usr/bin/perl -w
|
||||
print STDOUT "Enter the data size you want(Giga): ";
|
||||
$size=<STDIN>;
|
||||
unlink "region.tbl", "nation.tbl","supplier.tbl", "part.tbl","customer.tbl", "partsupp.tbl", "orders.tbl", "lineitem.tbl" ;
|
||||
print STDOUT "Generating data sets ...\n";
|
||||
system "./dbgen -s $size";
|
||||
print STDOUT "Converting to Calpont format ...\n";
|
||||
open(REGION, "<region.tbl") or die "Can't open region.tbl";
|
||||
open(REGION1, ">region1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <REGION> )
|
||||
{
|
||||
chomp;
|
||||
(@token) = split /\|/ ;
|
||||
print REGION1 $token[0], ", '", $token[1], "', '", $token[2], "'\n";
|
||||
}
|
||||
close(REGION);
|
||||
close(REGION1);
|
||||
unlink "region.tbl";
|
||||
rename "region1.tbl", "region.tbl";
|
||||
open(NATION, "<nation.tbl") or die "Can't open region.tbl";
|
||||
open(NATION1, ">nation1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <NATION> )
|
||||
{
|
||||
(@token) = split /\|/ ;
|
||||
print REGION1 $token[0], ", '", $token[1], "', '", $token[2], "'\n";
|
||||
}
|
||||
close(REGION);
|
||||
close(REGION1);
|
||||
unlink "region.tbl";
|
||||
rename "region1.tbl", "region.tbl";
|
||||
open(NATION, "<nation.tbl") or die "Can't open region.tbl";
|
||||
open(NATION1, ">nation1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <NATION> )
|
||||
{
|
||||
chomp;
|
||||
(@token) = split /\|/ ;
|
||||
print NATION1 $token[0], ", '", $token[1], "', ", $token[2], ", '", $token[3],"'\n";
|
||||
}
|
||||
close(NATION);
|
||||
close(NATION1);
|
||||
unlink "nation.tbl";
|
||||
rename "nation1.tbl", "nation.tbl";
|
||||
open(SUPPLIER, "<supplier.tbl") or die "Can't open region.tbl";
|
||||
open(SUPPLIER1, ">supplier1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <SUPPLIER> )
|
||||
{
|
||||
(@token) = split /\|/ ;
|
||||
print NATION1 $token[0], ", '", $token[1], "', ", $token[2], ", '", $token[3],"'\n";
|
||||
}
|
||||
close(NATION);
|
||||
close(NATION1);
|
||||
unlink "nation.tbl";
|
||||
rename "nation1.tbl", "nation.tbl";
|
||||
open(SUPPLIER, "<supplier.tbl") or die "Can't open region.tbl";
|
||||
open(SUPPLIER1, ">supplier1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <SUPPLIER> )
|
||||
{
|
||||
chomp;
|
||||
(@token) = split /\|/ ;
|
||||
print SUPPLIER1 $token[0], ", '", $token[1], "', '", $token[2], "', ", $token[3], ", '", $token[4], "', ", $token[5], ", '", $token[6],"'\n";
|
||||
}
|
||||
close(SUPPLIER);
|
||||
close(SUPPLIER);
|
||||
unlink "supplier.tbl";
|
||||
rename "supplier1.tbl", "supplier.tbl";
|
||||
open(PART, "<part.tbl") or die "Can't open region.tbl";
|
||||
open(PART1, ">part1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <PART> )
|
||||
{
|
||||
(@token) = split /\|/ ;
|
||||
print SUPPLIER1 $token[0], ", '", $token[1], "', '", $token[2], "', ", $token[3], ", '", $token[4], "', ", $token[5], ", '", $token[6],"'\n";
|
||||
}
|
||||
close(SUPPLIER);
|
||||
close(SUPPLIER);
|
||||
unlink "supplier.tbl";
|
||||
rename "supplier1.tbl", "supplier.tbl";
|
||||
open(PART, "<part.tbl") or die "Can't open region.tbl";
|
||||
open(PART1, ">part1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <PART> )
|
||||
{
|
||||
chomp;
|
||||
(@token) = split /\|/ ;
|
||||
print PART1 $token[0], ", '", $token[1], "', '", $token[2], "', '", $token[3], "', '", $token[4], "', ", $token[5], ", '", $token[6], "', ", $token[7], ", '", $token[8],"'\n";
|
||||
}
|
||||
close(PART);
|
||||
close(PART1);
|
||||
unlink "part.tbl";
|
||||
rename "part1.tbl", "part.tbl";
|
||||
open(CUSTOMER, "<customer.tbl") or die "Can't open region.tbl";
|
||||
open(CUSTOMER1, ">customer1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <CUSTOMER> )
|
||||
{
|
||||
(@token) = split /\|/ ;
|
||||
print PART1 $token[0], ", '", $token[1], "', '", $token[2], "', '", $token[3], "', '", $token[4], "', ", $token[5], ", '", $token[6], "', ", $token[7], ", '", $token[8],"'\n";
|
||||
}
|
||||
close(PART);
|
||||
close(PART1);
|
||||
unlink "part.tbl";
|
||||
rename "part1.tbl", "part.tbl";
|
||||
open(CUSTOMER, "<customer.tbl") or die "Can't open region.tbl";
|
||||
open(CUSTOMER1, ">customer1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <CUSTOMER> )
|
||||
{
|
||||
chomp;
|
||||
(@token) = split /\|/ ;
|
||||
print CUSTOMER1 $token[0], ", '", $token[1], "', '", $token[2], "', ", $token[3], ", '", $token[4], "', ", $token[5], ", '", $token[6], "', '", $token[7],"'\n";
|
||||
}
|
||||
close(CUSTOMER);
|
||||
close(CUSTOMER1);
|
||||
unlink "customer.tbl";
|
||||
rename "customer1.tbl", "customer.tbl";
|
||||
open(PARTSUPP, "<partsupp.tbl") or die "Can't open region.tbl";
|
||||
open(PARTSUPP1, ">partsupp1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <PARTSUPP> )
|
||||
{
|
||||
(@token) = split /\|/ ;
|
||||
print CUSTOMER1 $token[0], ", '", $token[1], "', '", $token[2], "', ", $token[3], ", '", $token[4], "', ", $token[5], ", '", $token[6], "', '", $token[7],"'\n";
|
||||
}
|
||||
close(CUSTOMER);
|
||||
close(CUSTOMER1);
|
||||
unlink "customer.tbl";
|
||||
rename "customer1.tbl", "customer.tbl";
|
||||
open(PARTSUPP, "<partsupp.tbl") or die "Can't open region.tbl";
|
||||
open(PARTSUPP1, ">partsupp1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <PARTSUPP> )
|
||||
{
|
||||
chomp;
|
||||
(@token) = split /\|/ ;
|
||||
print PARTSUPP1 $token[0], ", ", $token[1], ", ", $token[2], ", ", $token[3], ", '", $token[4],"'\n";
|
||||
}
|
||||
close(PARTSUPP);
|
||||
close(PARTSUPP1);
|
||||
unlink "partsupp.tbl";
|
||||
rename "partsupp1.tbl", "partsupp.tbl";
|
||||
open(ORDERS, "<orders.tbl") or die "Can't open region.tbl";
|
||||
open(ORDERS1, ">orders1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <ORDERS> )
|
||||
{
|
||||
(@token) = split /\|/ ;
|
||||
print PARTSUPP1 $token[0], ", ", $token[1], ", ", $token[2], ", ", $token[3], ", '", $token[4],"'\n";
|
||||
}
|
||||
close(PARTSUPP);
|
||||
close(PARTSUPP1);
|
||||
unlink "partsupp.tbl";
|
||||
rename "partsupp1.tbl", "partsupp.tbl";
|
||||
open(ORDERS, "<orders.tbl") or die "Can't open region.tbl";
|
||||
open(ORDERS1, ">orders1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <ORDERS> )
|
||||
{
|
||||
chomp;
|
||||
(@token) = split /\|/ ;
|
||||
print ORDERS1 $token[0], ", ", $token[1], ", '", $token[2], "', ", $token[3], ", '", $token[4], "', '", $token[5], "', '", $token[6], "', ", $token[7], ", '", $token[8],"'\n";
|
||||
}
|
||||
close(ORDERS);
|
||||
close(ORDERS1);
|
||||
unlink "orders.tbl";
|
||||
rename "orders1.tbl", "orders.tbl";
|
||||
open(LINEITEM, "<lineitem.tbl") or die "Can't open region.tbl";
|
||||
open(LINEITEM1, ">lineitem1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <LINEITEM> )
|
||||
{
|
||||
(@token) = split /\|/ ;
|
||||
print ORDERS1 $token[0], ", ", $token[1], ", '", $token[2], "', ", $token[3], ", '", $token[4], "', '", $token[5], "', '", $token[6], "', ", $token[7], ", '", $token[8],"'\n";
|
||||
}
|
||||
close(ORDERS);
|
||||
close(ORDERS1);
|
||||
unlink "orders.tbl";
|
||||
rename "orders1.tbl", "orders.tbl";
|
||||
open(LINEITEM, "<lineitem.tbl") or die "Can't open region.tbl";
|
||||
open(LINEITEM1, ">lineitem1.tbl") or die "Can't open region1.tbl";
|
||||
while ( <LINEITEM> )
|
||||
{
|
||||
chomp;
|
||||
(@token) = split /\|/ ;
|
||||
print LINEITEM1 $token[0], ", ", $token[1], ", ", $token[2], ", ", $token[3], ", ", $token[4], ", ", $token[5], ", ", $token[6], ", ", $token[7], ", '", $token[8], "', '", $token[9], "', '", $token[10], "', '", $token[11], "', '", $token[12], "', '", $token[13], "', '", $token[14], "', '", $token[15],"'\n";
|
||||
}
|
||||
close(LINEITEM);
|
||||
close(LINEITEM1);
|
||||
unlink "lineitem.tbl";
|
||||
(@token) = split /\|/ ;
|
||||
print LINEITEM1 $token[0], ", ", $token[1], ", ", $token[2], ", ", $token[3], ", ", $token[4], ", ", $token[5], ", ", $token[6], ", ", $token[7], ", '", $token[8], "', '", $token[9], "', '", $token[10], "', '", $token[11], "', '", $token[12], "', '", $token[13], "', '", $token[14], "', '", $token[15],"'\n";
|
||||
}
|
||||
close(LINEITEM);
|
||||
close(LINEITEM1);
|
||||
unlink "lineitem.tbl";
|
||||
rename "lineitem1.tbl", "lineitem.tbl";
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
0,'AFRICA','special Tiresias about the furiously even dolphins are furi'
|
||||
1,'AMERICA','even, ironic theodolites according to the bold platelets wa'
|
||||
2,'ASIA','silent, bold requests sleep slyly across the quickly sly dependencies. furiously silent instructions alongside '
|
||||
3,'EUROPE','special, bold deposits haggle foxes. platelet'
|
||||
0,'AFRICA','special Tiresias about the furiously even dolphins are furi'
|
||||
1,'AMERICA','even, ironic theodolites according to the bold platelets wa'
|
||||
2,'ASIA','silent, bold requests sleep slyly across the quickly sly dependencies. furiously silent instructions alongside '
|
||||
3,'EUROPE','special, bold deposits haggle foxes. platelet'
|
||||
4,'MIDDLE EAST','furiously unusual packages use carefully above the unusual, exp'
|
|
@ -1,50 +1,50 @@
|
||||
1,'Supplier#000000001',' N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ',17,'27-918-335-1736',5755.94,'requests haggle carefully. accounts sublate finally. carefully ironic pa'
|
||||
2,'Supplier#000000002','89eJ5ksX3ImxJQBvxObC,',5,'15-679-861-2259',4032.68,'furiously stealthy frays thrash alongside of the slyly express deposits. blithely regular req'
|
||||
3,'Supplier#000000003','q1,G3Pj6OjIuUYfUoH18BFTKP5aU9bEV3',1,'11-383-516-1199',4192.40,'furiously regular instructions impress slyly! carefu'
|
||||
4,'Supplier#000000004','Bk7ah4CK8SYQTepEmvMkkgMwg',15,'25-843-787-7479',4641.08,'final ideas cajole. furiously close dep'
|
||||
5,'Supplier#000000005','Gcdm2rJRzl5qlTVzc',11,'21-151-690-3663',283.84,'carefully silent instructions are slyly according t'
|
||||
6,'Supplier#000000006','tQxuVm7s7CnK',14,'24-696-997-4969',1365.79,'even requests wake carefully! fluffily final pinto beans run slyly among t'
|
||||
7,'Supplier#000000007','s,4TicNGB4uO6PaSqNBUq',23,'33-990-965-2201',6820.35,'carefully express packages believe furiously after the fur'
|
||||
8,'Supplier#000000008','9Sq4bBH2FQEmaFOocY45sRTxo6yuoG',17,'27-498-742-3860',7627.85,'carefully express escapades are slyly '
|
||||
9,'Supplier#000000009','1KhUgZegwM3ua7dsYmekYBsK',10,'20-403-398-8662',5302.37,'slyly regular decoys mold slyly ironic dugouts. requests are carefully-- carefully'
|
||||
10,'Supplier#000000010','Saygah3gYWMp72i PY',24,'34-852-489-8585',3891.91,'ironic deposits poach quickly furiously final accounts. carefull'
|
||||
11,'Supplier#000000011','JfwTs,LZrV, M,9C',18,'28-613-996-1505',3393.08,'quickly bold asymptotes mold carefully unusual pearls. requests boost at the blith'
|
||||
12,'Supplier#000000012','aLIW q0HYd',8,'18-179-925-7181',1432.69,'evenly pending theodolites lose. '
|
||||
13,'Supplier#000000013','HK71HQyWoqRWOX8GI FpgAifW,2PoH',3,'13-727-620-7813',9107.22,'ironically busy packages thrash '
|
||||
14,'Supplier#000000014','EXsnO5pTNj4iZRm',15,'25-656-247-5058',9189.82,'enticingly bold platelets wake against the'
|
||||
15,'Supplier#000000015','olXVbNBfVzRqgokr1T,Ie',8,'18-453-357-6394',308.56,'regular attainments cajole. furiously final reques'
|
||||
16,'Supplier#000000016','YjP5C55zHDXL7LalK27zfQnwejdpin4AMpvh',22,'32-822-502-4215',2972.26,'quick, final pains above the ironic, final instructions use furio'
|
||||
17,'Supplier#000000017','c2d,ESHRSkK3WYnxpgw6aOqN0q',19,'29-601-884-9219',1687.81,'slyly pending deposits boost quickly.'
|
||||
18,'Supplier#000000018','PGGVE5PWAMwKDZw ',16,'26-729-551-1115',7040.82,'carefully pending deposits haggle regular the'
|
||||
19,'Supplier#000000019','edZT3es,nBFD8lBXTGeTl',24,'34-278-310-2731',6150.38,'quickly regular pinto beans mold blithely slyly pending packages. unusual platelets are furiou'
|
||||
20,'Supplier#000000020','iybAE,RmTymrZVYaFZva2SH,j',3,'13-715-945-6730',530.82,'finally regular asymptotes play furiously among the carefully special warhorses. slyly'
|
||||
21,'Supplier#000000021','81CavellcrJ0PQ3CPBID0Z0JwyJm0ka5igEs',2,'12-253-590-5816',9365.80,'bravely ironic Tiresias run carefully. regular deposits integrate with the fluffily even f'
|
||||
22,'Supplier#000000022','okiiQFk 8lm6EVX6Q0,bEcO',4,'14-144-830-2814',966.20,'slyly special waters wake fluffily along the unusual package'
|
||||
23,'Supplier#000000023','ssetugTcXc096qlD7 2TL5crEEeS3zk',9,'19-559-422-5776',5926.41,'carefully special requests haggle. furiously busy theodolites haggle b'
|
||||
24,'Supplier#000000024','C4nPvLrVmKPPabFCj',0,'10-620-939-2254',9170.71,'quietly even theodolites alongside of the blithely special pin'
|
||||
25,'Supplier#000000025','RCQKONXMFnrodzz6w7fObFVV6CUm2q',22,'32-431-945-3541',9198.31,'even excuses wake about the carefully special packa'
|
||||
26,'Supplier#000000026','iV,MHzAx6Z939uzFNkq09M0a1 MBfH7',21,'31-758-894-4436',21.18,'slyly unusual pinto beans sleep carefully alongside of the furiously sly frets. regular, regula'
|
||||
27,'Supplier#000000027','lC4CjKwNHUr6L4xIpzOBK4NlHkFTg',18,'28-708-999-2028',1887.62,'furiously thin packages use '
|
||||
28,'Supplier#000000028','GBhvoRh,7YIN V',0,'10-538-384-8460',891.99,'regular, regular excuses boost quickl'
|
||||
29,'Supplier#000000029','658tEqXLPvRd6xpFdqC2',1,'11-555-705-5922',811.62,'blithely pending theodolites are carefully ironic requests! fluffily express instructions ab'
|
||||
30,'Supplier#000000030','84NmC1rmQfO0fj3zkobLT',16,'26-940-594-4852',8080.14,'express, bold deposits sleep according to th'
|
||||
31,'Supplier#000000031','fRJimA7zchyApqRLHcQeocVpP',16,'26-515-530-4159',5916.91,'blithely bold deposits boost fluffily slyly final'
|
||||
32,'Supplier#000000032','yvoD3TtZSx1skQNCK8agk5bZlZLug',23,'33-484-637-7873',3556.47,'furiously thin asymptotes are a'
|
||||
33,'Supplier#000000033','gfeKpYw3400L0SDywXA6Ya1Qmq1w6YB9f3R',7,'17-138-897-9374',8564.12,'ironic instructions are. special pearls above '
|
||||
34,'Supplier#000000034','mYRe3KvA2O4lL4HhxDKkkrPUDPMKRCSp,Xpa',10,'20-519-982-2343',237.31,'asymptotes are. special, ironic ideas on the close'
|
||||
35,'Supplier#000000035','QymmGXxjVVQ5OuABCXVVsu,4eF gU0Qc6',21,'31-720-790-5245',4381.41,'slyly bold pinto beans wake. dependencies nag furiously according to the asymptotes. car'
|
||||
36,'Supplier#000000036','mzSpBBJvbjdx3UKTW3bLFewRD78D91lAC879',13,'23-273-493-3679',2371.51,'slyly special braids among the regular, blithe p'
|
||||
37,'Supplier#000000037','cqjyB5h1nV',0,'10-470-144-1330',3017.47,'ironic requests alongside of the blithely express accounts wake fluffily above the carefully express'
|
||||
38,'Supplier#000000038','xEcx45vD0FXHT7c9mvWFY',4,'14-361-296-6426',2512.41,'blithely bold excuses haggle ironic, pending excuses. carefully bold deposits wake blithel'
|
||||
39,'Supplier#000000039','ZM, nSYpEPWr1yAFHaC91qjFcijjeU5eH',8,'18-851-856-5633',6115.65,'ironic, express instructions can sleep bl'
|
||||
40,'Supplier#000000040','zyIeWzbbpkTV37vm1nmSGBxSgd2Kp',22,'32-231-247-6991',290.06,'carefully regular accounts sleep ca'
|
||||
41,'Supplier#000000041','G 1FKHR435 wMKFmyt',18,'28-739-447-2525',6942.67,'silently regular packages hinder. blithely express decoys must '
|
||||
42,'Supplier#000000042','1Y5lwEgpe3j2vbUBYj3SwLhK62JlwEMtDC',22,'32-698-298-6317',6565.11,'carefully thin courts against the final, regular accounts ar'
|
||||
43,'Supplier#000000043','Z5mLuAoTUEeKY5v22VnnA4D87Ao6jF2LvMYnlX8h',12,'22-421-568-4862',7773.41,'slyly final accounts wake blithely slyly regular requests. sl'
|
||||
44,'Supplier#000000044','kERxlLDnlIZJdN66zAPHklyL',7,'17-713-930-5667',9759.38,'quickly final instructions after the bold requests hagg'
|
||||
45,'Supplier#000000045','LcKnsa8XGtIO0WYSB7hkOrH rnzRg1',9,'19-189-635-8862',2944.23,'furiously bold deposits use expres'
|
||||
46,'Supplier#000000046','e0URUXfDOYMdKe16Z5h5StMRbzGmTs,D2cjap',24,'34-748-308-3215',3580.35,'slyly express dependencies behind the blithely silent platelets use '
|
||||
47,'Supplier#000000047','3XM1x,Pcxqw,HK4XNlgbnZMbLhBHLA',14,'24-810-354-4471',2958.09,'regular deposits engage slyly with the'
|
||||
48,'Supplier#000000048','jg0U FNPMQDuyuKvTnLXXaLf3Wl6OtONA6mQlWJ',14,'24-722-551-9498',5630.62,'carefully unusual packages print '
|
||||
49,'Supplier#000000049','Nvq 6macF4GtJvz',24,'34-211-567-6800',9915.24,'blithely silent pinto beans hang slyly. blithely eve'
|
||||
1,'Supplier#000000001',' N kD4on9OM Ipw3,gf0JBoQDd7tgrzrddZ',17,'27-918-335-1736',5755.94,'requests haggle carefully. accounts sublate finally. carefully ironic pa'
|
||||
2,'Supplier#000000002','89eJ5ksX3ImxJQBvxObC,',5,'15-679-861-2259',4032.68,'furiously stealthy frays thrash alongside of the slyly express deposits. blithely regular req'
|
||||
3,'Supplier#000000003','q1,G3Pj6OjIuUYfUoH18BFTKP5aU9bEV3',1,'11-383-516-1199',4192.40,'furiously regular instructions impress slyly! carefu'
|
||||
4,'Supplier#000000004','Bk7ah4CK8SYQTepEmvMkkgMwg',15,'25-843-787-7479',4641.08,'final ideas cajole. furiously close dep'
|
||||
5,'Supplier#000000005','Gcdm2rJRzl5qlTVzc',11,'21-151-690-3663',283.84,'carefully silent instructions are slyly according t'
|
||||
6,'Supplier#000000006','tQxuVm7s7CnK',14,'24-696-997-4969',1365.79,'even requests wake carefully! fluffily final pinto beans run slyly among t'
|
||||
7,'Supplier#000000007','s,4TicNGB4uO6PaSqNBUq',23,'33-990-965-2201',6820.35,'carefully express packages believe furiously after the fur'
|
||||
8,'Supplier#000000008','9Sq4bBH2FQEmaFOocY45sRTxo6yuoG',17,'27-498-742-3860',7627.85,'carefully express escapades are slyly '
|
||||
9,'Supplier#000000009','1KhUgZegwM3ua7dsYmekYBsK',10,'20-403-398-8662',5302.37,'slyly regular decoys mold slyly ironic dugouts. requests are carefully-- carefully'
|
||||
10,'Supplier#000000010','Saygah3gYWMp72i PY',24,'34-852-489-8585',3891.91,'ironic deposits poach quickly furiously final accounts. carefull'
|
||||
11,'Supplier#000000011','JfwTs,LZrV, M,9C',18,'28-613-996-1505',3393.08,'quickly bold asymptotes mold carefully unusual pearls. requests boost at the blith'
|
||||
12,'Supplier#000000012','aLIW q0HYd',8,'18-179-925-7181',1432.69,'evenly pending theodolites lose. '
|
||||
13,'Supplier#000000013','HK71HQyWoqRWOX8GI FpgAifW,2PoH',3,'13-727-620-7813',9107.22,'ironically busy packages thrash '
|
||||
14,'Supplier#000000014','EXsnO5pTNj4iZRm',15,'25-656-247-5058',9189.82,'enticingly bold platelets wake against the'
|
||||
15,'Supplier#000000015','olXVbNBfVzRqgokr1T,Ie',8,'18-453-357-6394',308.56,'regular attainments cajole. furiously final reques'
|
||||
16,'Supplier#000000016','YjP5C55zHDXL7LalK27zfQnwejdpin4AMpvh',22,'32-822-502-4215',2972.26,'quick, final pains above the ironic, final instructions use furio'
|
||||
17,'Supplier#000000017','c2d,ESHRSkK3WYnxpgw6aOqN0q',19,'29-601-884-9219',1687.81,'slyly pending deposits boost quickly.'
|
||||
18,'Supplier#000000018','PGGVE5PWAMwKDZw ',16,'26-729-551-1115',7040.82,'carefully pending deposits haggle regular the'
|
||||
19,'Supplier#000000019','edZT3es,nBFD8lBXTGeTl',24,'34-278-310-2731',6150.38,'quickly regular pinto beans mold blithely slyly pending packages. unusual platelets are furiou'
|
||||
20,'Supplier#000000020','iybAE,RmTymrZVYaFZva2SH,j',3,'13-715-945-6730',530.82,'finally regular asymptotes play furiously among the carefully special warhorses. slyly'
|
||||
21,'Supplier#000000021','81CavellcrJ0PQ3CPBID0Z0JwyJm0ka5igEs',2,'12-253-590-5816',9365.80,'bravely ironic Tiresias run carefully. regular deposits integrate with the fluffily even f'
|
||||
22,'Supplier#000000022','okiiQFk 8lm6EVX6Q0,bEcO',4,'14-144-830-2814',966.20,'slyly special waters wake fluffily along the unusual package'
|
||||
23,'Supplier#000000023','ssetugTcXc096qlD7 2TL5crEEeS3zk',9,'19-559-422-5776',5926.41,'carefully special requests haggle. furiously busy theodolites haggle b'
|
||||
24,'Supplier#000000024','C4nPvLrVmKPPabFCj',0,'10-620-939-2254',9170.71,'quietly even theodolites alongside of the blithely special pin'
|
||||
25,'Supplier#000000025','RCQKONXMFnrodzz6w7fObFVV6CUm2q',22,'32-431-945-3541',9198.31,'even excuses wake about the carefully special packa'
|
||||
26,'Supplier#000000026','iV,MHzAx6Z939uzFNkq09M0a1 MBfH7',21,'31-758-894-4436',21.18,'slyly unusual pinto beans sleep carefully alongside of the furiously sly frets. regular, regula'
|
||||
27,'Supplier#000000027','lC4CjKwNHUr6L4xIpzOBK4NlHkFTg',18,'28-708-999-2028',1887.62,'furiously thin packages use '
|
||||
28,'Supplier#000000028','GBhvoRh,7YIN V',0,'10-538-384-8460',891.99,'regular, regular excuses boost quickl'
|
||||
29,'Supplier#000000029','658tEqXLPvRd6xpFdqC2',1,'11-555-705-5922',811.62,'blithely pending theodolites are carefully ironic requests! fluffily express instructions ab'
|
||||
30,'Supplier#000000030','84NmC1rmQfO0fj3zkobLT',16,'26-940-594-4852',8080.14,'express, bold deposits sleep according to th'
|
||||
31,'Supplier#000000031','fRJimA7zchyApqRLHcQeocVpP',16,'26-515-530-4159',5916.91,'blithely bold deposits boost fluffily slyly final'
|
||||
32,'Supplier#000000032','yvoD3TtZSx1skQNCK8agk5bZlZLug',23,'33-484-637-7873',3556.47,'furiously thin asymptotes are a'
|
||||
33,'Supplier#000000033','gfeKpYw3400L0SDywXA6Ya1Qmq1w6YB9f3R',7,'17-138-897-9374',8564.12,'ironic instructions are. special pearls above '
|
||||
34,'Supplier#000000034','mYRe3KvA2O4lL4HhxDKkkrPUDPMKRCSp,Xpa',10,'20-519-982-2343',237.31,'asymptotes are. special, ironic ideas on the close'
|
||||
35,'Supplier#000000035','QymmGXxjVVQ5OuABCXVVsu,4eF gU0Qc6',21,'31-720-790-5245',4381.41,'slyly bold pinto beans wake. dependencies nag furiously according to the asymptotes. car'
|
||||
36,'Supplier#000000036','mzSpBBJvbjdx3UKTW3bLFewRD78D91lAC879',13,'23-273-493-3679',2371.51,'slyly special braids among the regular, blithe p'
|
||||
37,'Supplier#000000037','cqjyB5h1nV',0,'10-470-144-1330',3017.47,'ironic requests alongside of the blithely express accounts wake fluffily above the carefully express'
|
||||
38,'Supplier#000000038','xEcx45vD0FXHT7c9mvWFY',4,'14-361-296-6426',2512.41,'blithely bold excuses haggle ironic, pending excuses. carefully bold deposits wake blithel'
|
||||
39,'Supplier#000000039','ZM, nSYpEPWr1yAFHaC91qjFcijjeU5eH',8,'18-851-856-5633',6115.65,'ironic, express instructions can sleep bl'
|
||||
40,'Supplier#000000040','zyIeWzbbpkTV37vm1nmSGBxSgd2Kp',22,'32-231-247-6991',290.06,'carefully regular accounts sleep ca'
|
||||
41,'Supplier#000000041','G 1FKHR435 wMKFmyt',18,'28-739-447-2525',6942.67,'silently regular packages hinder. blithely express decoys must '
|
||||
42,'Supplier#000000042','1Y5lwEgpe3j2vbUBYj3SwLhK62JlwEMtDC',22,'32-698-298-6317',6565.11,'carefully thin courts against the final, regular accounts ar'
|
||||
43,'Supplier#000000043','Z5mLuAoTUEeKY5v22VnnA4D87Ao6jF2LvMYnlX8h',12,'22-421-568-4862',7773.41,'slyly final accounts wake blithely slyly regular requests. sl'
|
||||
44,'Supplier#000000044','kERxlLDnlIZJdN66zAPHklyL',7,'17-713-930-5667',9759.38,'quickly final instructions after the bold requests hagg'
|
||||
45,'Supplier#000000045','LcKnsa8XGtIO0WYSB7hkOrH rnzRg1',9,'19-189-635-8862',2944.23,'furiously bold deposits use expres'
|
||||
46,'Supplier#000000046','e0URUXfDOYMdKe16Z5h5StMRbzGmTs,D2cjap',24,'34-748-308-3215',3580.35,'slyly express dependencies behind the blithely silent platelets use '
|
||||
47,'Supplier#000000047','3XM1x,Pcxqw,HK4XNlgbnZMbLhBHLA',14,'24-810-354-4471',2958.09,'regular deposits engage slyly with the'
|
||||
48,'Supplier#000000048','jg0U FNPMQDuyuKvTnLXXaLf3Wl6OtONA6mQlWJ',14,'24-722-551-9498',5630.62,'carefully unusual packages print '
|
||||
49,'Supplier#000000049','Nvq 6macF4GtJvz',24,'34-211-567-6800',9915.24,'blithely silent pinto beans hang slyly. blithely eve'
|
||||
50,'Supplier#000000050','rGobqSMMYz0ErrPhCGS',9,'19-561-560-7437',4515.87,'quickly regular theodolites wake within the slyly even accounts. furiously express accounts'
|
|
Loading…
x
Reference in New Issue
Block a user