BUGFIX: depart the ls meta lock

This commit is contained in:
obdev
2023-11-20 08:32:44 +00:00
committed by ob-robot
parent 7f360fc2f5
commit 4c53146024
64 changed files with 682 additions and 557 deletions

View File

@ -42,7 +42,7 @@ gmt_create TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
gmt_modified TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
primary key (name)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists BUSINESS_ACTION_000
CREATE TABLE if not exists BUSINESS_ACTION_000
(
ACTION_ID int NOT NULL,
TX_ID varchar(128) NOT NULL,
@ -53,7 +53,7 @@ GMT_MODIFIED TIMESTAMP(6) default "2012-01-01 12:00:00" NOT NULL,
CONTEXT varchar(4000),
primary key (ACTION_ID)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists BUSINESS_ACTIVITY_000
CREATE TABLE if not exists BUSINESS_ACTIVITY_000
(
TX_ID varchar(128) NOT NULL,
STATE VARCHAR(1) NOT NULL,
@ -64,7 +64,7 @@ PROPAGATION VARCHAR(1),
CONTEXT varchar(2048),
primary key (TX_ID)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists NOTIFY_000
CREATE TABLE if not exists NOTIFY_000
(
ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL,
@ -83,7 +83,7 @@ primary key (id)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER);
CREATE INDEX NOTIFY_PLUGIN_IND ON NOTIFY_000 (PLUGIN, CHANNEL_ENDPOINT);
CREATE TABLE if not exists NOTIFY_HISTORY_000
CREATE TABLE if not exists NOTIFY_HISTORY_000
(
ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL,
@ -102,7 +102,7 @@ PRIMARY KEY (ID)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX NOTIFY_HISTORY_000_BORDER_IND ON NOTIFY_HISTORY_000 (BUSINESS_ORDER);
CREATE INDEX NOTIFY_HISTORY_IG_IND ON NOTIFY_HISTORY_000 (IW_USER_ID, GROUP_NO);
CREATE TABLE if not exists TIMEOUT_000
CREATE TABLE if not exists TIMEOUT_000
(
JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64),
@ -122,7 +122,7 @@ PRIMARY KEY (JOB_ID)
CREATE INDEX IND_BEYOND_TIMEOUT_ETIME ON TIMEOUT_000 (END_TIME);
CREATE INDEX TIMEOUT_000_PL_IND ON TIMEOUT_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_TNO_IND ON TIMEOUT_000 (TRADE_NO);
CREATE TABLE if not exists TIMEOUT_HISTORY_000
CREATE TABLE if not exists TIMEOUT_HISTORY_000
(
JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -139,7 +139,7 @@ GMT_MODIFIED TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
GMT_OCCUR TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TIMEOUT_LONG_000
CREATE TABLE if not exists TIMEOUT_LONG_000
(
JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64),
@ -159,7 +159,7 @@ PRIMARY KEY (JOB_ID)
CREATE INDEX BYD_TIMEOUT_LONG_ENDTIME_IND ON TIMEOUT_LONG_000 (END_TIME);
CREATE INDEX TIMEOUT_LONG_000_PL_IND ON TIMEOUT_LONG_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_LONG_TNO_IND ON TIMEOUT_LONG_000 (TRADE_NO);
CREATE TABLE if not exists TIMEOUT_REMIND_000
CREATE TABLE if not exists TIMEOUT_REMIND_000
(
JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64),
@ -179,7 +179,7 @@ PRIMARY KEY (JOB_ID)
CREATE INDEX BY_TIMEOUT_REMIND_ETIME_IND ON TIMEOUT_REMIND_000 (END_TIME);
CREATE INDEX TIMEOUT_REMIND_000_PL_IND ON TIMEOUT_REMIND_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_REMIND_TNO_IND ON TIMEOUT_REMIND_000 (TRADE_NO);
CREATE TABLE if not exists TRADE_BASE_000
CREATE TABLE if not exists TRADE_BASE_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -228,13 +228,13 @@ GOODS_TYPE VARCHAR(4),
GOODS_SUB_TYPE VARCHAR(4),
PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX BYD_TRADE_BASE_TEMAIL_GMTC_IND ON TRADE_BASE_000
CREATE INDEX BYD_TRADE_BASE_TEMAIL_GMTC_IND ON TRADE_BASE_000
(TRADE_EMAIL, GMT_CREATE);
CREATE INDEX IND_BEYOND_TRADE_BASE_BUYGMT1 ON TRADE_BASE_000
CREATE INDEX IND_BEYOND_TRADE_BASE_BUYGMT1 ON TRADE_BASE_000
(BUYER_ACCOUNT, GMT_CREATE);
CREATE INDEX IND_BEYOND_TRADE_BASE_SALGMT1 ON TRADE_BASE_000
CREATE INDEX IND_BEYOND_TRADE_BASE_SALGMT1 ON TRADE_BASE_000
(SELLER_ACCOUNT, GMT_CREATE);
CREATE TABLE if not exists TRADE_CHARGE_000
CREATE TABLE if not exists TRADE_CHARGE_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -265,7 +265,7 @@ primary key (TRADE_NO, SERVICT_TYPE, CHARGE_TYPE, SUB_TRADE_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_EXT_000
CREATE TABLE if not exists TRADE_EXT_000
(
TRADE_NO varchar(64) NOT NULL,
EXT_INFO varchar(1000),
@ -288,7 +288,7 @@ PAY_CHANNELS varchar(900),
PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_EXT_000_GMT_IND ON TRADE_EXT_000 (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_FUND_BILL_000
CREATE TABLE if not exists TRADE_FUND_BILL_000
(
BILL_NO varchar(128) NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -316,15 +316,15 @@ BILL_EXT varchar(200),
PAY_ORDER_NO varchar(64),
primary key (TRADE_NO,BILL_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX BYD_TRADE_FUND_BILL_PF_IND ON TRADE_FUND_BILL_000
CREATE INDEX BYD_TRADE_FUND_BILL_PF_IND ON TRADE_FUND_BILL_000
(PAY_ACCOUNT_NO, GMT_TRADE_CREATE);
CREATE INDEX BYD_TRADE_FUND_BILL_RF_IND ON TRADE_FUND_BILL_000
CREATE INDEX BYD_TRADE_FUND_BILL_RF_IND ON TRADE_FUND_BILL_000
(RECEIVE_ACCOUNT_NO, GMT_TRADE_CREATE);
CREATE INDEX TRADE_FUND_BILL_PTG_IND ON TRADE_FUND_BILL_000
CREATE INDEX TRADE_FUND_BILL_PTG_IND ON TRADE_FUND_BILL_000
(PARTNER_ID, GMT_TRADE_CREATE);
CREATE INDEX TRADE_FUND_BILL_000_GMT_IND ON TRADE_FUND_BILL_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_GOODS_INFO_000
CREATE TABLE if not exists TRADE_GOODS_INFO_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -354,7 +354,7 @@ LOGISTICS_NAME VARCHAR(128),
INVOICE_NO VARCHAR(64),
SIGN_VOUCHER_NO VARCHAR(64),
TRANSPORT_TYPE int,
TRANSPORT_FEE int default 0 NOT NULL,
TRANSPORT_FEE int default 0 NOT NULL,
OTHER_FEE int default 0,
ADDITIONAL_SERVICE VARCHAR(300),
LOGISTICS_STATUS VARCHAR(100),
@ -393,7 +393,7 @@ primary key (TRADE_NO, TRADE_OR_REFUND_FLAG, ID)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_LOGISTICS_000_GMT_IND ON TRADE_LOGISTICS_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -406,7 +406,7 @@ IS_READ int default 0 NOT NULL,
GMT_CREATE TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
PRIMARY KEY (TRADE_NO, ID)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_NOTE_000
CREATE TABLE if not exists TRADE_NOTE_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -421,7 +421,7 @@ NOTE_TYPE varchar(100),
REMOTE_MAC varchar(64),
primary key (TRADE_NO, ID, GMT_CREATE)
)DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_OUTTRADE_000
CREATE TABLE if not exists TRADE_OUTTRADE_000
(
PARTNER_ID varchar(200) NOT NULL,
OUT_TRADE_NO varchar(64) NOT NULL,
@ -430,7 +430,7 @@ TRADE_NO varchar(64) NOT NULL,
GMT_CREATE TIMESTAMP(6) default "2012-01-01 12:00:00" NOT NULL,
primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_PAYMENT_CLAUSE_000
CREATE TABLE if not exists TRADE_PAYMENT_CLAUSE_000
(
ID int NOT NULL,
OUT_RELATION_ID varchar(64),
@ -452,9 +452,9 @@ MEMO varchar(1000),
CONTEXT varchar(1000),
primary key (TRADE_NO, OUT_RELATION_ID)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_PCLAUSE_000_GMT_IND ON TRADE_PAYMENT_CLAUSE_000
CREATE INDEX TRADE_PCLAUSE_000_GMT_IND ON TRADE_PAYMENT_CLAUSE_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_PAYMENT_ORDER_000
CREATE TABLE if not exists TRADE_PAYMENT_ORDER_000
(
ORDER_NO varchar(64) NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -480,7 +480,7 @@ primary key (TRADE_NO, ORDER_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_PROCESS_000
CREATE TABLE if not exists TRADE_PROCESS_000
(
ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL,
@ -517,11 +517,11 @@ EXPIRE_TIME TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
SEND_BACK_FEE int,
PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX IND_BYD_TRD_PROCESS_GRPAY ON TRADE_PROCESS_000
CREATE INDEX IND_BYD_TRD_PROCESS_GRPAY ON TRADE_PROCESS_000
(GMT_RECEIVE_PAY, RECEIVE_FEE);
CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_REFUND_000
CREATE TABLE if not exists TRADE_REFUND_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -554,14 +554,14 @@ GMT_LAST_APPLY TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
REFUND_FOREX_FEE int,
PRIMARY KEY (TRADE_NO, ID)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_REFUND_BG_IND ON TRADE_REFUND_000
CREATE INDEX TRADE_REFUND_BG_IND ON TRADE_REFUND_000
(BUY_ACCOUNT, GMT_CREATE);
CREATE INDEX TRADE_REFUND_SG_IND ON TRADE_REFUND_000
CREATE INDEX TRADE_REFUND_SG_IND ON TRADE_REFUND_000
(SELL_ACCOUNT, GMT_CREATE);
CREATE INDEX TRADE_REFUND_TG_IND ON TRADE_REFUND_000
CREATE INDEX TRADE_REFUND_TG_IND ON TRADE_REFUND_000
(TRADE_EMAIL, GMT_CREATE);
CREATE INDEX TRADE_REFUND_000_GMT_IND ON TRADE_REFUND_000 (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_VOUCHER_000
CREATE TABLE if not exists TRADE_VOUCHER_000
(
ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL,

View File

@ -38,7 +38,7 @@ gmt_create TIMESTAMP(6) default "2012-01-01 12:00:00",
gmt_modified TIMESTAMP(6) default "2012-01-01 12:00:00",
primary key (name)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists BUSINESS_ACTION_000
CREATE TABLE if not exists BUSINESS_ACTION_000
(
ACTION_ID int NOT NULL,
TX_ID varchar(128) NOT NULL,
@ -49,7 +49,7 @@ GMT_MODIFIED TIMESTAMP NOT NULL,
CONTEXT varchar(4000),
primary key (ACTION_ID)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists BUSINESS_ACTIVITY_000
CREATE TABLE if not exists BUSINESS_ACTIVITY_000
(
TX_ID varchar(128) NOT NULL,
STATE VARCHAR(1) NOT NULL,
@ -60,7 +60,7 @@ PROPAGATION VARCHAR(1),
CONTEXT varchar(2048),
primary key (TX_ID)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists NOTIFY_000
CREATE TABLE if not exists NOTIFY_000
(
ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL,
@ -79,7 +79,7 @@ primary key (id)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER);
CREATE INDEX NOTIFY_PLUGIN_IND ON NOTIFY_000 (PLUGIN, CHANNEL_ENDPOINT);
CREATE TABLE if not exists NOTIFY_HISTORY_000
CREATE TABLE if not exists NOTIFY_HISTORY_000
(
ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL,
@ -98,7 +98,7 @@ PRIMARY KEY (ID)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX NOTIFY_HISTORY_000_BORDER_IND ON NOTIFY_HISTORY_000 (BUSINESS_ORDER);
CREATE INDEX NOTIFY_HISTORY_IG_IND ON NOTIFY_HISTORY_000 (IW_USER_ID, GROUP_NO);
CREATE TABLE if not exists TIMEOUT_000
CREATE TABLE if not exists TIMEOUT_000
(
JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64),
@ -118,7 +118,7 @@ PRIMARY KEY (JOB_ID)
CREATE INDEX IND_BEYOND_TIMEOUT_ETIME ON TIMEOUT_000 (END_TIME);
CREATE INDEX TIMEOUT_000_PL_IND ON TIMEOUT_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_TNO_IND ON TIMEOUT_000 (TRADE_NO);
CREATE TABLE if not exists TIMEOUT_HISTORY_000
CREATE TABLE if not exists TIMEOUT_HISTORY_000
(
JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -135,7 +135,7 @@ GMT_MODIFIED TIMESTAMP(6) default "2012-01-01 12:00:00",
GMT_OCCUR TIMESTAMP(6) default "2012-01-01 12:00:00",
PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TIMEOUT_LONG_000
CREATE TABLE if not exists TIMEOUT_LONG_000
(
JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64),
@ -155,7 +155,7 @@ PRIMARY KEY (JOB_ID)
CREATE INDEX BYD_TIMEOUT_LONG_ENDTIME_IND ON TIMEOUT_LONG_000 (END_TIME);
CREATE INDEX TIMEOUT_LONG_000_PL_IND ON TIMEOUT_LONG_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_LONG_TNO_IND ON TIMEOUT_LONG_000 (TRADE_NO);
CREATE TABLE if not exists TIMEOUT_REMIND_000
CREATE TABLE if not exists TIMEOUT_REMIND_000
(
JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64),
@ -175,7 +175,7 @@ PRIMARY KEY (JOB_ID)
CREATE INDEX BY_TIMEOUT_REMIND_ETIME_IND ON TIMEOUT_REMIND_000 (END_TIME);
CREATE INDEX TIMEOUT_REMIND_000_PL_IND ON TIMEOUT_REMIND_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_REMIND_TNO_IND ON TIMEOUT_REMIND_000 (TRADE_NO);
CREATE TABLE if not exists TRADE_BASE_000
CREATE TABLE if not exists TRADE_BASE_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -224,13 +224,13 @@ GOODS_TYPE VARCHAR(4),
GOODS_SUB_TYPE VARCHAR(4),
PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX BYD_TRADE_BASE_TEMAIL_GMTC_IND ON TRADE_BASE_000
CREATE INDEX BYD_TRADE_BASE_TEMAIL_GMTC_IND ON TRADE_BASE_000
(TRADE_EMAIL, GMT_CREATE);
CREATE INDEX IND_BEYOND_TRADE_BASE_BUYGMT1 ON TRADE_BASE_000
CREATE INDEX IND_BEYOND_TRADE_BASE_BUYGMT1 ON TRADE_BASE_000
(BUYER_ACCOUNT, GMT_CREATE);
CREATE INDEX IND_BEYOND_TRADE_BASE_SALGMT1 ON TRADE_BASE_000
CREATE INDEX IND_BEYOND_TRADE_BASE_SALGMT1 ON TRADE_BASE_000
(SELLER_ACCOUNT, GMT_CREATE);
CREATE TABLE if not exists TRADE_CHARGE_000
CREATE TABLE if not exists TRADE_CHARGE_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -261,7 +261,7 @@ primary key (TRADE_NO, SERVICT_TYPE, CHARGE_TYPE, SUB_TRADE_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_EXT_000
CREATE TABLE if not exists TRADE_EXT_000
(
TRADE_NO varchar(64) NOT NULL,
EXT_INFO varchar(1000),
@ -284,7 +284,7 @@ PAY_CHANNELS varchar(900),
PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_EXT_000_GMT_IND ON TRADE_EXT_000 (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_FUND_BILL_000
CREATE TABLE if not exists TRADE_FUND_BILL_000
(
BILL_NO varchar(128) NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -316,7 +316,7 @@ CREATE INDEX BYD_TRADE_FUND_BILL_PF_IND ON TRADE_FUND_BILL_000(PAY_ACCOUNT_NO, G
CREATE INDEX BYD_TRADE_FUND_BILL_RF_IND ON TRADE_FUND_BILL_000(RECEIVE_ACCOUNT_NO, GMT_TRADE_CREATE);
CREATE INDEX TRADE_FUND_BILL_PTG_IND ON TRADE_FUND_BILL_000 (PARTNER_ID, GMT_TRADE_CREATE);
CREATE INDEX TRADE_FUND_BILL_000_GMT_IND ON TRADE_FUND_BILL_000(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_GOODS_INFO_000
CREATE TABLE if not exists TRADE_GOODS_INFO_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -346,7 +346,7 @@ LOGISTICS_NAME VARCHAR(128),
INVOICE_NO VARCHAR(64),
SIGN_VOUCHER_NO VARCHAR(64),
TRANSPORT_TYPE int,
TRANSPORT_FEE int default 0 NOT NULL,
TRANSPORT_FEE int default 0 NOT NULL,
OTHER_FEE int default 0,
ADDITIONAL_SERVICE VARCHAR(300),
LOGISTICS_STATUS VARCHAR(100),
@ -385,7 +385,7 @@ primary key (TRADE_NO, TRADE_OR_REFUND_FLAG, ID)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_LOGISTICS_000_GMT_IND ON TRADE_LOGISTICS_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -398,7 +398,7 @@ IS_READ int default 0 NOT NULL,
GMT_CREATE TIMESTAMP(6) default "2012-01-01 12:00:00",
PRIMARY KEY (TRADE_NO, ID)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_NOTE_000
CREATE TABLE if not exists TRADE_NOTE_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -413,7 +413,7 @@ NOTE_TYPE varchar(100),
REMOTE_MAC varchar(64),
primary key (TRADE_NO, ID, GMT_CREATE)
)DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_OUTTRADE_000
CREATE TABLE if not exists TRADE_OUTTRADE_000
(
PARTNER_ID varchar(200) NOT NULL,
OUT_TRADE_NO varchar(64) NOT NULL,
@ -422,7 +422,7 @@ TRADE_NO varchar(64) NOT NULL,
GMT_CREATE TIMESTAMP NOT NULL,
primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM)
) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_PAYMENT_CLAUSE_000
CREATE TABLE if not exists TRADE_PAYMENT_CLAUSE_000
(
ID int NOT NULL,
OUT_RELATION_ID varchar(64),
@ -444,9 +444,9 @@ MEMO varchar(1000),
CONTEXT varchar(1000),
primary key (TRADE_NO, OUT_RELATION_ID)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_PCLAUSE_000_GMT_IND ON TRADE_PAYMENT_CLAUSE_000
CREATE INDEX TRADE_PCLAUSE_000_GMT_IND ON TRADE_PAYMENT_CLAUSE_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_PAYMENT_ORDER_000
CREATE TABLE if not exists TRADE_PAYMENT_ORDER_000
(
ORDER_NO varchar(64) NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -472,7 +472,7 @@ primary key (TRADE_NO, ORDER_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_PROCESS_000
CREATE TABLE if not exists TRADE_PROCESS_000
(
ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL,
@ -509,11 +509,11 @@ EXPIRE_TIME TIMESTAMP(6) default "2012-01-01 12:00:00",
SEND_BACK_FEE int,
PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX IND_BYD_TRD_PROCESS_GRPAY ON TRADE_PROCESS_000
CREATE INDEX IND_BYD_TRD_PROCESS_GRPAY ON TRADE_PROCESS_000
(GMT_RECEIVE_PAY, RECEIVE_FEE);
CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000
(GMT_MODIFIED);
CREATE TABLE if not exists TRADE_REFUND_000
CREATE TABLE if not exists TRADE_REFUND_000
(
ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL,
@ -546,14 +546,14 @@ GMT_LAST_APPLY TIMESTAMP(6) default "2012-01-01 12:00:00",
REFUND_FOREX_FEE int,
PRIMARY KEY (TRADE_NO, ID)
)DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_REFUND_BG_IND ON TRADE_REFUND_000
CREATE INDEX TRADE_REFUND_BG_IND ON TRADE_REFUND_000
(BUY_ACCOUNT, GMT_CREATE);
CREATE INDEX TRADE_REFUND_SG_IND ON TRADE_REFUND_000
CREATE INDEX TRADE_REFUND_SG_IND ON TRADE_REFUND_000
(SELL_ACCOUNT, GMT_CREATE);
CREATE INDEX TRADE_REFUND_TG_IND ON TRADE_REFUND_000
CREATE INDEX TRADE_REFUND_TG_IND ON TRADE_REFUND_000
(TRADE_EMAIL, GMT_CREATE);
CREATE INDEX TRADE_REFUND_000_GMT_IND ON TRADE_REFUND_000 (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_VOUCHER_000
CREATE TABLE if not exists TRADE_VOUCHER_000
(
ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL,

View File

@ -42,5 +42,5 @@ c1 c1
2 3
show columns from tt1;
Field Type Null Key Default Extra
c1 int(11) NO PRI NULL
c2 int(11) YES NULL
c1 int(11) NO PRI NULL
c2 int(11) YES NULL

View File

@ -1,6 +1,6 @@
set sql_mode='';
drop table if exists t;
create table t(id int primary key auto_increment,
create table t(id int primary key auto_increment,
int_val smallint,
uint_val smallint unsigned,
flt_val float(5, 3),

View File

@ -12,8 +12,8 @@ c1 c2
1 1
desc t2;
Field Type Null Key Default Extra
c1 int(11) NO PRI NULL
c2 int(11) YES NULL
c1 int(11) NO PRI NULL
c2 int(11) YES NULL
set autocommit=1;
begin;
insert into t1 values(2,2);
@ -25,8 +25,8 @@ c1 c2
2 2
desc t3;
Field Type Null Key Default Extra
c1 int(11) NO PRI NULL
c2 int(11) YES NULL
c1 int(11) NO PRI NULL
c2 int(11) YES NULL
create table ddl_t(c int);
set autocommit = off;
insert into ddl_t values(3);

View File

@ -46,7 +46,7 @@ Outputs & filters:
affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
@ -56,7 +56,7 @@ Outputs & filters:
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
drop table t1;
create table t1 (c1 int(11) , c2 int(11) , c3 int(11), primary key (c2, c3)) partition by key(c2) partitions 2;
@ -87,7 +87,7 @@ Outputs & filters:
affinitize, force partition granule
4 - output([t1.c2], [t1.c3], [t1.c1]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
@ -97,7 +97,7 @@ Outputs & filters:
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
drop table t1;
create table t1 (c1 int(11) , c2 int(11) , c3 int(11), c4 date, primary key (c2, c3)) partition by range columns(c2)
@ -131,13 +131,13 @@ Outputs & filters:
force partition granule
6 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
7 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
affinitize, force partition granule, asc
8 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c3= t2.c3;
Query Plan
@ -166,7 +166,7 @@ Outputs & filters:
force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
6 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
@ -176,7 +176,7 @@ Outputs & filters:
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_bnl(t1 t2)*/ * from t1 join t2 on t1.c3= t2.c3;
Query Plan
@ -204,7 +204,7 @@ Outputs & filters:
force partition granule
4 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
6 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
@ -213,7 +213,7 @@ Outputs & filters:
force partition granule, asc
8 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
explain select /*+use_nl(t1 t2)*/ * from t1 left join t2 on t1.c2= t2.c2;
Query Plan
@ -242,7 +242,7 @@ Outputs & filters:
affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
6 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
@ -252,7 +252,7 @@ Outputs & filters:
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(t1 t2)*/ * from t1 left join t2 on t1.c1= t2.c1;
Query Plan
@ -283,14 +283,14 @@ Outputs & filters:
force partition granule, asc
6 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
7 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
affinitize, force partition granule
8 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN ; MAX),
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN ; MAX),
range_cond([:0 = t2.c1])
explain select /*+use_nl(t1 t2)*/ * from t1 left join t2 on t1.c2= t2.c2 and t1.c3= t2.c3;
Query Plan
@ -319,7 +319,7 @@ Outputs & filters:
affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
@ -329,7 +329,7 @@ Outputs & filters:
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(t1 t2)*/ * from t1 left join t2 on t1.c1= t2.c1 and t1.c3= t2.c3;
Query Plan
@ -360,14 +360,14 @@ Outputs & filters:
force partition granule, asc
6 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
7 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
affinitize, force partition granule
8 - output([t2.c1], [t2.c2], [t2.c3]), filter([:1 = t2.c3]), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN ; MAX),
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN ; MAX),
range_cond([:0 = t2.c1])
explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c2= t2.c2;
Query Plan
@ -396,7 +396,7 @@ Outputs & filters:
affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
6 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
@ -406,7 +406,7 @@ Outputs & filters:
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c1= t2.c1;
Query Plan
@ -435,7 +435,7 @@ Outputs & filters:
affinitize, force partition granule
4 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
6 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
@ -445,7 +445,7 @@ Outputs & filters:
force partition granule, asc
9 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c2= t2.c2 and t1.c3= t2.c3;
Query Plan
@ -474,7 +474,7 @@ Outputs & filters:
affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
@ -484,7 +484,7 @@ Outputs & filters:
force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select c1 from t11 where c2 not in (select c2 from t11);
Query Plan
@ -512,7 +512,7 @@ Outputs & filters:
force partition granule
4 - output([t11.c2]), filter(nil), rowset=16
access([t11.c2]), partitions(p[0-4])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(MIN ; MAX)always true
5 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
6 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
@ -521,7 +521,7 @@ Outputs & filters:
force partition granule
8 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
access([t11.c1], [t11.c2]), partitions(p[0-4])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(MIN ; MAX)always true
explain select c1 from t12 where c1 not in (select c1 from t11 where c2 not in (select c2 from t11));
Query Plan
@ -567,7 +567,7 @@ Outputs & filters:
force partition granule
10 - output([t11.c2]), filter(nil), rowset=16
access([t11.c2]), partitions(p[0-4])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(MIN ; MAX)always true
11 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
12 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
@ -576,13 +576,13 @@ Outputs & filters:
force partition granule
14 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
access([t11.c1], [t11.c2]), partitions(p[0-4])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(MIN ; MAX)always true
15 - output([t12.c1]), filter(nil), rowset=16
affinitize, force partition granule
16 - output([t12.c1]), filter(nil), rowset=16
access([t12.c1]), partitions(p[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t12.c1]), range(MIN ; MAX)always true
explain select * from (select /*+use_nl(t11 t12)*/ t12.c1 from t11,t12 where t11.c1=t12.c1 limit 1) v order by v.c1;
Query Plan
@ -625,14 +625,14 @@ Outputs & filters:
force partition granule
10 - output([t12.c1]), filter(nil), rowset=16
access([t12.c1]), partitions(p[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t12.c1]), range(MIN ; MAX)always true
11 - output(nil), filter(nil), rowset=16
affinitize, force partition granule
12 - output(nil), filter(nil), rowset=16
access(nil), partitions(p[0-4])
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(MIN ; MAX),
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(MIN ; MAX),
range_cond([t11.c1 = :0])
explain select count(c1) from t11 group by c1 having c1 in (select t12.c1 from t12 where t11.c1=t12.c2);
Query Plan
@ -663,13 +663,13 @@ Outputs & filters:
force partition granule
6 - output([t11.c1]), filter(nil), rowset=16
access([t11.c1]), partitions(p[0-4])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(MIN ; MAX)always true
7 - output([t12.c2]), filter(nil), rowset=16
affinitize, force partition granule
8 - output([t12.c2]), filter([t12.c2 = t12.c1]), rowset=16
access([t12.c1], [t12.c2]), partitions(p[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t12.c1]), range(MIN ; MAX)always true
explain select * from t11 where c1 in (select c1 from t12 where (1 = 0 or c1 > 5));
Query Plan
@ -700,15 +700,15 @@ Outputs & filters:
force partition granule
6 - output([t12.c1]), filter(nil), rowset=16
access([t12.c1]), partitions(p[0-2])
is_index_back=false, is_global_index=false,
range_key([t12.c1]), range(5 ; MAX),
is_index_back=false, is_global_index=false,
range_key([t12.c1]), range(5 ; MAX),
range_cond([t12.c1 > 5])
7 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
affinitize, force partition granule
8 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
access([t11.c1], [t11.c2]), partitions(p[0-4])
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(5 ; MAX),
is_index_back=false, is_global_index=false,
range_key([t11.c1]), range(5 ; MAX),
range_cond([t11.c1 > 5])
create table t4 (c1 int, c2 int, c3 date, c4 int, primary key(c1,c2,c3)) partition by hash(c1) subpartition by range columns(c3)
subpartition template( subpartition p_2016_11_02_00 values less than ('2016-11-02'),
@ -749,7 +749,7 @@ Outputs & filters:
force partition granule
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
6 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
@ -759,7 +759,7 @@ Outputs & filters:
force partition granule
9 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
access([t5.c1], [t5.c2], [t5.c3], [t5.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(t4 t5)*/ * from t4 left join t5 on t4.c1= t5.c1;
Query Plan
@ -784,12 +784,12 @@ Outputs & filters:
force partition granule
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
access([GROUP_ID], [t5.c1], [t5.c2], [t5.c3], [t5.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN ; MAX),
is_index_back=false, is_global_index=false,
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN ; MAX),
range_cond([:0 = t5.c1])
explain select /*+use_nl(t4 t5)*/ * from t4 join t5 on t4.c2= t5.c2 and t4.c3= t5.c3;
Query Plan
@ -815,12 +815,12 @@ Outputs & filters:
conds([t4.c2 = t5.c2], [t4.c3 = t5.c3]), nl_params_(nil), use_batch=false
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t5.c2], [t5.c3], [t5.c1], [t5.c4]), filter(nil), rowset=16
6 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
access([t5.c1], [t5.c2], [t5.c3], [t5.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select * from t4 left join t5 on t4.c1= t5.c1 and t4.c3 = t5.c3;
Query Plan
@ -845,11 +845,11 @@ Outputs & filters:
equal_conds([t4.c1 = t5.c1], [t4.c3 = t5.c3]), other_conds(nil)
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
access([t5.c1], [t5.c2], [t5.c3], [t5.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(t4 t5)*/ * from t4 left join t5 on t4.c1= t5.c2 and t4.c3 = t5.c3;
Query Plan
@ -875,12 +875,12 @@ Outputs & filters:
conds([t4.c1 = t5.c2], [t4.c3 = t5.c3]), nl_params_(nil), use_batch=false
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t5.c2], [t5.c3], [t5.c1], [t5.c4]), filter(nil), rowset=16
6 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
access([t5.c1], [t5.c2], [t5.c3], [t5.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(t4 t1)*/ * from t4 left join t1 on t4.c1= t1.c1 and t4.c3 = t1.c4;
Query Plan
@ -909,7 +909,7 @@ Outputs & filters:
affinitize, force partition granule
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t1.c1], [t1.c4], [t1.c2], [t1.c3]), filter(nil), rowset=16
6 - output([t1.c1], [t1.c4], [t1.c2], [t1.c3]), filter(nil), rowset=16
@ -919,7 +919,7 @@ Outputs & filters:
force partition granule, asc
9 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
explain select /*+use_nl(t5 t4)*/ * from t5 left join t4 on t4.c1= t5.c2 and t4.c3 = t5.c3;
Query Plan
@ -944,12 +944,12 @@ Outputs & filters:
conds(nil), nl_params_([t5.c2(:0)], [t5.c3(:1)]), use_batch=true
4 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
access([t5.c1], [t5.c2], [t5.c3], [t5.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter([t4.c3 = :1]), rowset=16
access([GROUP_ID], [t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN ; MAX),
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN ; MAX),
range_cond([t4.c1 = :0])
explain select /*+use_nl(t1 t4)*/ * from t1 left join t4 on t4.c1= t1.c1 and t4.c3 = t1.c4;
Query Plan
@ -980,14 +980,14 @@ Outputs & filters:
force partition granule, asc
6 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1], [t1.c4]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c2], [t1.c3]), range(MIN,MIN ; MAX,MAX)always true
7 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
affinitize, force partition granule
8 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter([t4.c3 = :1]), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN ; MAX),
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN ; MAX),
range_cond([t4.c1 = :0])
explain select /*+use_nl(t4 t5)*/ * from t4 left join t5 on t4.c1= t5.c1 and t4.c3 = t5.c3;
Query Plan
@ -1012,12 +1012,12 @@ Outputs & filters:
conds(nil), nl_params_([t4.c1(:0)], [t4.c3(:1)]), use_batch=true
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter([:1 = t5.c3]), rowset=16
access([GROUP_ID], [t5.c1], [t5.c2], [t5.c3], [t5.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN ; MAX),
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN ; MAX),
range_cond([:0 = t5.c1])
explain select * from (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as a join t5 as b on a.c1 = b.c1 and a.c3 = b.c3 join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1054,7 +1054,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([a.c1], [b.c3], [b.c1], [a.c3], [b.c2], [b.c4], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
equal_conds([a.c1 = b.c1], [a.c3 = b.c3]), other_conds(nil)
@ -1062,7 +1062,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
9 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
@ -1083,7 +1083,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
17 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select * from t5 as a join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as b on a.c1 = b.c1 and a.c3 = b.c3 join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1129,7 +1129,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
8 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
9 - output([a.c1], [a.c2], [a.c3], [a.c4], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
equal_conds([c.c1 = a.c1]), other_conds(nil)
@ -1140,7 +1140,7 @@ Outputs & filters:
force partition granule
13 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
14 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
15 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
@ -1149,7 +1149,7 @@ Outputs & filters:
force partition granule
17 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select * from t5 as a join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1186,7 +1186,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
4 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([b.c1], [b.c3], [c.c1], [c.c3], [b.c2], [b.c4], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
equal_conds([b.c1 = c.c1], [b.c3 = c.c3]), other_conds(nil)
@ -1194,7 +1194,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
9 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
@ -1215,7 +1215,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
17 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(a b) use_nl(b c)*/ * from (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as a join t5 as b on a.c1 = b.c1 and a.c3 = b.c3 join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1253,7 +1253,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([a.c1], [b.c3], [b.c1], [a.c3], [b.c2], [b.c4], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
conds([a.c1 = b.c1], [a.c3 = b.c3]), nl_params_(nil), use_batch=false
@ -1261,7 +1261,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
9 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
@ -1283,7 +1283,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
18 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as b on a.c1 = b.c1 and a.c3 = b.c3 join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1321,7 +1321,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([a.c1], [b.c3], [b.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
conds([a.c1 = b.c1], [a.c3 = b.c3]), nl_params_(nil), use_batch=false
@ -1329,7 +1329,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
7 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([b.c3], [b.c1], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
9 - output([b.c3], [b.c1], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
@ -1351,7 +1351,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
18 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1389,7 +1389,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
4 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([b.c1], [b.c3], [c.c1], [c.c3], [b.c2], [b.c4], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
conds([b.c1 = c.c1], [b.c3 = c.c3]), nl_params_(nil), use_batch=false
@ -1397,7 +1397,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
9 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
@ -1419,7 +1419,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
18 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(a b) use_nl(b c)*/ * from (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 2) as a left join t5 as b on a.c1 = b.c1 and a.c3 = b.c3 left join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1470,7 +1470,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
12 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
13 - output([b.c1], [b.c3], [b.c2], [b.c4], [c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
@ -1478,12 +1478,12 @@ Outputs & filters:
conds(nil), nl_params_([b.c1(:0)], [b.c3(:1)]), use_batch=true
15 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
16 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter([:1 = c.c3]), rowset=16
access([GROUP_ID], [c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([c.c1], [c.c2], [c.c3]), range(MIN ; MAX),
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([c.c1], [c.c2], [c.c3]), range(MIN ; MAX),
range_cond([:0 = c.c1])
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a left join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as b on a.c1 = b.c1 and a.c3 = b.c3 left join t6 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1523,7 +1523,7 @@ Outputs & filters:
affinitize, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([b.c1], [b.c3], [a.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
6 - output([b.c1], [b.c3], [a.c1], [a.c3], [a.c2], [a.c4], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
@ -1534,7 +1534,7 @@ Outputs & filters:
affinitize, force partition granule
9 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
10 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
11 - output([b.c1], [b.c3], [b.yyy], [b.max(c4)]), filter(nil), rowset=16
@ -1556,7 +1556,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
20 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(a b) use_nl(b c)*/ * from t5 as a left join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 left join (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 1) as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1594,7 +1594,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
4 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([b.c1], [b.c3], [c.c1], [c.c3], [b.c2], [b.c4], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
conds([b.c1 = c.c1], [b.c3 = c.c3]), nl_params_(nil), use_batch=false
@ -1602,7 +1602,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
8 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
9 - output([c.c1], [c.c3], [c.yyy], [c.max(c4)]), filter(nil), rowset=16
@ -1624,7 +1624,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
18 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(c)*/ * from t5 as a left join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 left join t4 as c on b.c1=c.c1 and b.c3 = c.c3;
Query Plan
@ -1651,17 +1651,17 @@ Outputs & filters:
equal_conds([b.c1 = c.c1], [b.c3 = c.c3]), other_conds(nil)
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([b.c1], [b.c3], [a.c1], [a.c3], [a.c2], [a.c4], [b.c2], [b.c4]), filter(nil), rowset=16
equal_conds([a.c1 = b.c1], [a.c3 = b.c3]), other_conds(nil)
6 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_nl(c)*/ * from t5 as a left join t6 as b on a.c1 = b.c1 and a.c3 = b.c3 left join t4 as c on b.c1=c.c1 and b.c3 = c.c3 limit 100;
Query Plan
@ -1703,7 +1703,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule
6 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
access([c.c1], [c.c2], [c.c3], [c.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([c.c1], [c.c2], [c.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
7 - output([VIEW1.a.c1], [VIEW1.a.c2], [VIEW1.a.c3], [VIEW1.a.c4], [b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
equal_conds([VIEW1.a.c1 = b.c1], [VIEW1.a.c3 = b.c3]), other_conds(nil)
@ -1723,13 +1723,13 @@ Outputs & filters:
force partition granule
16 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16
access([a.c1], [a.c2], [a.c3], [a.c4]), partitions(p0sp[0-2])
limit(100), offset(nil), is_index_back=false, is_global_index=false,
limit(100), offset(nil), is_index_back=false, is_global_index=false,
range_key([a.c1], [a.c2], [a.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
17 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule
18 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
explain select /*+use_bnl(a b)*/ * from (select c1, c3, sum(c2) as yyy, max(c4) from t4 group by c3 order by yyy limit 2) as a left join t5 as b on a.c1 = b.c1 and a.c3 = b.c3 ;
Query Plan
@ -1763,7 +1763,7 @@ Outputs & filters:
affinitize, force partition granule
4 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
access([b.c1], [b.c2], [b.c3], [b.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([b.c1], [b.c2], [b.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
5 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
6 - output([a.c1], [a.c3], [a.yyy], [a.max(c4)]), filter(nil), rowset=16
@ -1784,6 +1784,6 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)])
14 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
access([t4.c1], [t4.c2], [t4.c3], [t4.c4]), partitions(p0sp[0-2])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
drop database yy;

View File

@ -55,7 +55,7 @@ Outputs & filters:
-------------------------------------
0 - output([cast(1, DECIMAL(1, 0)) < cast('2009-12-17 06:03:17', DECIMAL(1, -1))]), filter(nil)
values({cast(1, DECIMAL(1, 0)) < cast('2009-12-17 06:03:17', DECIMAL(1, -1))})
Outline Data:
Outline Data:
-------------------------------------
/*+
BEGIN_OUTLINE_DATA

View File

@ -31,8 +31,8 @@ INFLUX_ID
create table fin_influx_terminal(influx_id varchar(64) primary key, inst_id varchar(32), inst_merchant_no varchar(32), inst_terminal_no varchar(32), term_batch_no varchar(6), term_trace_no varchar(6), rrn varchar(12), auth_code varchar(6), gmt_create datetime, gmt_modified datetime, finance_exchange_code varchar(32), inst_account_no varchar(32), exchange_amount int, exchange_currency char(3), extension varchar(4000));
select influx_id, inst_id, inst_merchant_no, inst_terminal_no, term_batch_no, term_trace_no, rrn, auth_code, gmt_create, gmt_modified, finance_exchange_code, inst_account_no, exchange_amount, exchange_currency, extension from fin_influx_terminal where influx_id='0001' and term_trace_no = '123';
influx_id inst_id inst_merchant_no inst_terminal_no term_batch_no term_trace_no rrn auth_code gmt_create gmt_modified finance_exchange_code inst_account_no exchange_amount exchange_currency extension
create table fin_info_transaction(
info_id varchar(64) primary key,
create table fin_info_transaction(
info_id varchar(64) primary key,
inst_id varchar(32),
business_code varchar(16),
sub_business_code varchar(16),

View File

@ -29,7 +29,7 @@ count(distinct a) count(distinct grp)
create table t2 (pk int primary key, grp int, a int, c char(10));
select grp,max(a)+max(grp),max(c) from t1 group by grp order by grp;
grp max(a)+max(grp) max(c)
NULL NULL
NULL NULL
1 2 a
2 5 c
3 9 E

View File

@ -143,7 +143,7 @@ Outputs & filters:
force partition granule
6 - output([t8.c15]), filter(nil), rowset=16
access([t8.c15]), partitions(p[0-19])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
7 - output([t8.c15]), filter(nil), rowset=16
8 - output([t8.c15]), filter(nil), rowset=16
@ -152,11 +152,11 @@ Outputs & filters:
force partition granule
10 - output([t8.c15]), filter(nil), rowset=16
access([t8.c15]), partitions(p[0-19])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
11 - output([t8_alias1.c10]), filter(nil), rowset=16
access([t8_alias1.c10]), partitions(p0)
limit(1), offset(nil), is_index_back=false, is_global_index=true,
limit(1), offset(nil), is_index_back=false, is_global_index=true,
range_key([t8_alias1.c10], [t8_alias1.c18], [t8_alias1.c7], [t8_alias1.c6]), range(MIN,MIN,MIN,MIN ; MAX,MAX,MAX,MAX)always true
(select /*+USE_HASH_AGGREGATION*/ c15 from (select c15 from t8) except (select c15 from t8) order by 1 limit 1000) union all (select t8_alias1.c10 from t8 t8_alias1 limit 1);
c15
@ -192,7 +192,7 @@ Outputs & filters:
force partition granule
6 - output([t8.c15]), filter(nil), rowset=16
access([t8.c15]), partitions(p[0-19])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
7 - output([t8.c15]), filter(nil), rowset=16
8 - output([t8.c15]), filter(nil), rowset=16
@ -201,11 +201,11 @@ Outputs & filters:
force partition granule
10 - output([t8.c15]), filter(nil), rowset=16
access([t8.c15]), partitions(p[0-19])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
11 - output([t8_alias1.c10]), filter(nil), rowset=16
access([t8_alias1.c10]), partitions(p0)
limit(1), offset(nil), is_index_back=false, is_global_index=true,
limit(1), offset(nil), is_index_back=false, is_global_index=true,
range_key([t8_alias1.c10], [t8_alias1.c18], [t8_alias1.c7], [t8_alias1.c6]), range(MIN,MIN,MIN,MIN ; MAX,MAX,MAX,MAX)always true
(select /*+USE_HASH_AGGREGATION*/ c15 from (select c15 from t8) intersect (select c15 from t8) order by 1 limit 1000) union all (select t8_alias1.c10 from t8 t8_alias1 limit 1);
c15
@ -234,14 +234,14 @@ Outputs & filters:
2 - output([EXCEPT([1])], [cast(EXCEPT([1]), VARCHAR(127))]), filter(nil), rowset=16
3 - output([t8.c6]), filter([t8.c6 < 1000]), rowset=16
access([t8.c6]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
4 - output([t8.c6]), filter([t8.c6 > -1000]), rowset=16
access([t8.c6]), partitions(p0)
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t8_alias1.c10]), filter(nil), rowset=16
access([t8_alias1.c10]), partitions(p0)
limit(1), offset(nil), is_index_back=false, is_global_index=false,
limit(1), offset(nil), is_index_back=false, is_global_index=false,
range_key([t8_alias1.c7], [t8_alias1.c6]), range(MIN,MIN ; MAX,MAX)always true
drop table t1,t2,t3,t4,t5,t6, t8;

View File

@ -22,8 +22,8 @@ drop table if exists t1;
create table t1(a int primary key ,b int);
desc t1;
Field Type Null Key Default Extra
a int(11) NO PRI NULL
b int(11) YES NULL
a int(11) NO PRI NULL
b int(11) YES NULL
select * from t1;
a b
drop table t1;

View File

@ -376,7 +376,7 @@ Query Plan
Outputs & filters:
-------------------------------------
0 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
limit(5), offset(nil)
1 - output([T_FUN_SUM(T_FUN_SUM(t1.c1))], [T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1))], [T_FUN_SUM(T_FUN_SUM(t1.c2))], [T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2))],
@ -404,7 +404,7 @@ Outputs & filters:
force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(20 6)*/ avg(c1), avg(c2), avg(c3) from t1 where c2 <10 group by c2 order by avg(c1);
Query Plan
@ -428,7 +428,7 @@ Outputs & filters:
DOUBLE(-1, -1)))) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1)))]), filter(nil), rowset=256
sort_keys([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4)), ASC])
1 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [INTERNAL_FUNCTION(cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c
1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4)), cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)), DECIMAL(33, 0))
1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4)), cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)), DECIMAL(33, 0))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4)), cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3,
DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1)))]), filter(nil), rowset=256
dop=1
@ -452,7 +452,7 @@ Outputs & filters:
force partition granule
8 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(20 6)*/ avg(c1), avg(c2), avg(c3) from t1 where c2 <10 order by avg(c1) limit 5;
Query Plan
@ -470,7 +470,7 @@ Query Plan
Outputs & filters:
-------------------------------------
0 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
limit(5), offset(nil)
1 - output([T_FUN_SUM(T_FUN_SUM(t1.c1))], [T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1))], [T_FUN_SUM(T_FUN_SUM(t1.c2))], [T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2))],
@ -490,7 +490,7 @@ Outputs & filters:
force partition granule
6 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(20 6)*/ avg(c1), avg(c2), avg(c3) from t1 where c2 <10 group by c2 order by avg(c1) limit 5 for update nowait;
Query Plan
@ -513,7 +513,7 @@ Query Plan
Outputs & filters:
-------------------------------------
0 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
1 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [T_FUN_SUM(T_FUN_SUM(t1.c2))],
[T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2))], [T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))], [T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))))]), filter(nil), rowset=256
@ -547,7 +547,7 @@ Outputs & filters:
force partition granule
11 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select avg(c1), avg(c2), avg(c3) from t1 where c2 <10 group by c2 order by avg(c1) limit 5;
Query Plan
@ -568,7 +568,7 @@ Query Plan
Outputs & filters:
-------------------------------------
0 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
limit(5), offset(nil)
1 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [T_FUN_SUM(T_FUN_SUM(t1.c2))],
@ -598,7 +598,7 @@ Outputs & filters:
force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(20 6)*/ sql_calc_found_rows avg(c2), avg(c3) from t1 where c2 <10 group by c2 order by avg(c1) limit 5;
Query Plan
@ -647,7 +647,7 @@ Outputs & filters:
force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(20 6)*/ avg(c1), avg(c2), avg(c3) from t1 where c2 <10 group by c2 order by (select c1 from t1 where c2 = 1 and c1 != 1) limit 5;
Query Plan
@ -672,7 +672,7 @@ Query Plan
Outputs & filters:
-------------------------------------
0 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
limit(5), offset(nil)
1 - output([T_FUN_SUM(T_FUN_SUM(t1.c1))], [T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1))], [T_FUN_SUM(T_FUN_SUM(t1.c2))], [T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2))],
@ -700,7 +700,7 @@ Outputs & filters:
force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
10 - output([t1.c1]), filter(nil), rowset=256
11 - output([t1.c1]), filter(nil), rowset=256
@ -709,8 +709,8 @@ Outputs & filters:
force partition granule
13 - output([t1.c1]), filter([t1.c2 = 1]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(NULL ; 1), (1 ; MAX),
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(NULL ; 1), (1 ; MAX),
range_cond([t1.c1 != 1])
explain basic select /*+topk(20 6)*/ distinct avg(c1), avg(c2), avg(c3) from t1 where c2 <10 group by c2 order by avg(c1) limit 5;
Query Plan
@ -736,53 +736,53 @@ Query Plan
Outputs & filters:
-------------------------------------
0 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
limit(5), offset(nil)
1 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
sort_keys([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4)), ASC])
2 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
dop=1
3 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
limit(5), offset(nil)
4 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
distinct([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))])
5 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
sort_keys([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4)), ASC],
[cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4)), ASC], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3,
DOUBLE(-1, -1)))) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), ASC])
6 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
(#keys=3, [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), dop=1
7 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
distinct([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))])
8 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
sort_keys([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4)), ASC],
[cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4)), ASC], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3,
DOUBLE(-1, -1)))) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), ASC])
9 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c2)),
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2)), DECIMAL(20, 0)), DECIMAL(15, 4))], [cast(T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))
/ cast(T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1))]), filter(nil), rowset=256
group([t1.c2]), agg_func([T_FUN_SUM(T_FUN_SUM(t1.c1))], [T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1))], [T_FUN_SUM(T_FUN_SUM(t1.c2))], [T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c2))],
[T_FUN_SUM(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))))], [T_FUN_COUNT_SUM(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))))])
@ -799,7 +799,7 @@ Outputs & filters:
force partition granule
14 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(20 6)*/ sum(c1), avg(c2), group_concat(c3, c1) from t1 where c2 <10 group by c2 order by avg(c1) limit 5;
Query Plan
@ -842,7 +842,7 @@ Outputs & filters:
force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 2) use_hash_aggregation*/ c3, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by c3 limit 1;
Query Plan
@ -897,7 +897,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(90 2) use_hash_aggregation*/ c3, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <30 group by c2 order by c3 limit 10;
Query Plan
@ -952,7 +952,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 30]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 1)*/ c3, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by c3 limit 1;
Query Plan
@ -1007,7 +1007,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 1)*/ c3, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <12 group by c2 order by c3 limit 1 offset 4;
Query Plan
@ -1062,7 +1062,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 12]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 1)*/ c3, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by c3 limit 0;
Query Plan
@ -1117,7 +1117,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 1)*/ c2, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <12 group by c2 order by avg(c3), sum(c1)/sum(c2) limit 5;
Query Plan
@ -1174,7 +1174,7 @@ Outputs & filters:
[T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), ASC], [cast(T_FUN_SUM(t1.c1),
DECIMAL(33, 0)) / cast(T_FUN_SUM(t1.c2), DECIMAL(33, 0)), ASC]), minimum_row_count:1 top_precision:1 , limit(5), offset(nil)
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
/ cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [cast(T_FUN_SUM(t1.c1), DECIMAL(33,
0)) / cast(T_FUN_SUM(t1.c2), DECIMAL(33, 0))], [T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
group([t1.c2]), agg_func([T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1)], [T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)],
@ -1183,7 +1183,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 12]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 1)*/ c1, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by avg(c3) desc, sum(c1)/sum(c2) limit 5;
Query Plan
@ -1249,7 +1249,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 1)*/ c2, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by avg(c3) desc, sum(c1)/sum(c2) + avg(c2) limit 5;
Query Plan
@ -1312,7 +1312,7 @@ Outputs & filters:
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [cast(T_FUN_SUM(t1.c1),
DECIMAL(33, 0)) / cast(T_FUN_SUM(t1.c2), DECIMAL(33, 0)) + cast(cast(T_FUN_SUM(t1.c2), DECIMAL(33, 0)) / cast(T_FUN_COUNT(t1.c2), DECIMAL(20, 0)), DECIMAL(15,
4)), ASC]), minimum_row_count:1 top_precision:1 , limit(5), offset(nil)
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
/ cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_COUNT(t1.c2)], [cast(T_FUN_SUM(t1.c1),
DECIMAL(33, 0)) / cast(T_FUN_SUM(t1.c2), DECIMAL(33, 0)) + cast(cast(T_FUN_SUM(t1.c2), DECIMAL(33, 0)) / cast(T_FUN_COUNT(t1.c2), DECIMAL(20, 0)), DECIMAL(15,
4))], [T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
@ -1322,7 +1322,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 1)*/ avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by avg(c3) desc, sum(c1)+sum(c2) limit 5;
Query Plan
@ -1374,9 +1374,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1
7 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_COUNT(t1.c3)],
[T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
+ T_FUN_SUM(t1.c2), ASC]), minimum_row_count:1 top_precision:1 , limit(5), offset(nil)
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
/ cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1) + T_FUN_SUM(t1.c2)],
[T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
group([t1.c2]), agg_func([T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1)], [T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)],
@ -1385,7 +1385,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(0 0)*/ c2, sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by avg(c3) desc, sum(c1)+sum(c2) limit 5;
Query Plan
@ -1441,7 +1441,7 @@ Outputs & filters:
force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(0 10)*/ c2, sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by avg(c3) desc, sum(c1)+sum(c2) limit 5;
Query Plan
@ -1492,9 +1492,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1
7 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_COUNT(t1.c3)],
[T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
+ T_FUN_SUM(t1.c2), ASC]), minimum_row_count:10 top_precision:0 , limit(5), offset(nil)
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
/ cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1) + T_FUN_SUM(t1.c2)],
[T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
group([t1.c2]), agg_func([T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1)], [T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)],
@ -1503,7 +1503,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(50 0)*/ c2, sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by avg(c3) desc, sum(c1)+sum(c2) limit 5;
Query Plan
@ -1554,9 +1554,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1
7 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_COUNT(t1.c3)],
[T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
+ T_FUN_SUM(t1.c2), ASC]), minimum_row_count:0 top_precision:50 , limit(5), offset(nil)
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
/ cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1) + T_FUN_SUM(t1.c2)],
[T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
group([t1.c2]), agg_func([T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1)], [T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)],
@ -1565,7 +1565,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(10000 1)*/ c2, sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by avg(c3) desc, sum(c1)+sum(c2) limit 5;
Query Plan
@ -1616,9 +1616,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1
7 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_COUNT(t1.c3)],
[T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
+ T_FUN_SUM(t1.c2), ASC]), minimum_row_count:1 top_precision:10000 , limit(5), offset(nil)
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
/ cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1) + T_FUN_SUM(t1.c2)],
[T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
group([t1.c2]), agg_func([T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1)], [T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)],
@ -1627,7 +1627,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select /*+topk(1 10000)*/ c2, sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 where c2 <10 group by c2 order by avg(c3) desc, sum(c1)+sum(c2) limit 5;
Query Plan
@ -1678,9 +1678,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1
7 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_COUNT(t1.c3)],
[T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
sort_keys([cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1))) / cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1)), DESC], [T_FUN_SUM(t1.c1)
+ T_FUN_SUM(t1.c2), ASC]), minimum_row_count:10000 top_precision:1 , limit(5), offset(nil)
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
8 - output([t1.c2], [T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))], [T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1)))], [cast(T_FUN_SUM(cast(t1.c3, DOUBLE(-1, -1)))
/ cast(T_FUN_COUNT(cast(t1.c3, DOUBLE(-1, -1))), DOUBLE(-1, -1)), DOUBLE(-1, -1))], [T_FUN_SUM(t1.c1)], [T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1) + T_FUN_SUM(t1.c2)],
[T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)]), filter(nil), rowset=256
group([t1.c2]), agg_func([T_FUN_SUM(t1.c2)], [T_FUN_SUM(t1.c1)], [T_FUN_COUNT(t1.c3)], [T_FUN_MIN(t1.c3)], [T_FUN_MAX(t1.c1)], [T_FUN_COUNT(t1.c1)],
@ -1689,7 +1689,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2], [t1.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
set @@ob_enable_transformation=default;
explain basic select * from (select /*+topk(0 4)*/ avg(c1) from t1 where c2 <10 group by c2 order by sum(c2) limit 5) as a;
@ -1732,7 +1732,7 @@ Outputs & filters:
force partition granule
10 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select c1 from t1 where c1 < any (select /*+topk(0 4)*/ avg(c1) from t1 where c2 <10 group by c2 order by sum(c2) limit 5);
Query Plan
@ -1769,7 +1769,7 @@ Outputs & filters:
force partition granule
4 - output([t1.c1]), filter(nil), rowset=256
access([t1.c1]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c1]), range(MIN ; MAX)always true
5 - output([VIEW1.avg(c1)]), filter(nil), rowset=256
6 - output([VIEW1.avg(c1)]), filter(nil), rowset=256
@ -1795,7 +1795,7 @@ Outputs & filters:
force partition granule
17 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic (select /*+topk(0 4)*/ avg(c1) from t1 where c2 <10 group by c2 order by sum(c2) limit 5) union (select /*+topk(0 10)*/ sum(c1) from t1 where c2 <10 group by c2 order by sum(c2) limit 7);
Query Plan
@ -1842,7 +1842,7 @@ Outputs & filters:
force partition granule
9 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
10 - output([UNION([1])]), filter(nil), rowset=256
11 - output([cast(cast(VIEW1.T_FUN_SUM(t1.c1), DECIMAL(33, 0)) / cast(VIEW1.T_FUN_COUNT(t1.c1), DECIMAL(20, 0)), DECIMAL(15, 4))]), filter(nil), rowset=256
@ -1898,7 +1898,7 @@ Outputs & filters:
force partition granule
4 - output([t1.c1]), filter(nil), rowset=256
access([t1.c1]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c1]), range(MIN ; MAX)always true
5 - output([cast(cast(T_FUN_SUM(T_FUN_SUM(t1.c1)), DECIMAL(33, 0)) / cast(T_FUN_COUNT_SUM(T_FUN_COUNT(t1.c1)), DECIMAL(20, 0)), DECIMAL(15, 4))]), filter(nil), rowset=256
limit(1), offset(nil)
@ -1921,7 +1921,7 @@ Outputs & filters:
force partition granule
15 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1])
is_index_back=false, is_global_index=false, filter_before_indexback[false],
is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t1.c1]), range(MIN ; MAX)always true
explain basic select * from (select /*+topk(10 5)*/ c3, c1, avg(c1), sum(c2), sum(c1) + sum(c2), count(c3), min(c3), max(c1), sum(c2)/count(c1), sum(c3)/sum(c1) from t1 group by c2 order by c3 limit 7) as a left join t2 on a.c1 = t2.c1 left join t3 on t3.c1 = a.c1;
Query Plan
@ -1967,7 +1967,7 @@ Outputs & filters:
affinitize, force partition granule
4 - output([t3.c1], [t3.c2], [t3.c3]), filter(nil), rowset=256
access([t3.c1], [t3.c2], [t3.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t3.c1]), range(MIN ; MAX)always true
5 - output([a.c1], [t2.c1], [t2.c2], [t2.c3], [a.c3], [a.avg(c1)], [a.sum(c2)], [a.sum(c1) + sum(c2)], [a.count(c3)], [a.min(c3)], [a.max(c1)], [a.sum(c2)/count(c1)],
[a.sum(c3)/sum(c1)]), filter(nil), rowset=256
@ -1981,7 +1981,7 @@ Outputs & filters:
affinitize, force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=256
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t2.c1]), range(MIN ; MAX)always true
10 - output([a.c1], [a.c3], [a.avg(c1)], [a.sum(c2)], [a.sum(c1) + sum(c2)], [a.count(c3)], [a.min(c3)], [a.max(c1)], [a.sum(c2)/count(c1)], [a.sum(c3)/sum(c1)]), filter(nil), rowset=256
11 - output([a.c1], [a.c3], [a.avg(c1)], [a.sum(c2)], [a.sum(c1) + sum(c2)], [a.count(c3)], [a.min(c3)], [a.max(c1)], [a.sum(c2)/count(c1)], [a.sum(c3)/sum(c1)]), filter(nil), rowset=256
@ -2022,7 +2022,7 @@ Outputs & filters:
force partition granule
23 - output([t1.c1], [t1.c3], [t1.c2]), filter(nil), rowset=256
access([t1.c1], [t1.c3], [t1.c2]), partitions(p[0-1])
is_index_back=false, is_global_index=false,
is_index_back=false, is_global_index=false,
range_key([t1.c1]), range(MIN ; MAX)always true
drop table t1;
drop table t2;

View File

@ -23,11 +23,11 @@ create table table_t8(c1 int null,c2 int not null);
create view view_v8 as select c1+c2 from table_t8;
desc view_v8;
Field Type Null Key Default Extra
c1+c2 bigint(12) YES NULL
c1+c2 bigint(12) YES NULL
create view view_v9 as select c1+c2 from table_t8 a;
desc view_v9;
Field Type Null Key Default Extra
c1+c2 bigint(12) YES NULL
c1+c2 bigint(12) YES NULL
drop table table_t8;
drop view view_v8;
drop view view_v9;

View File

@ -215,7 +215,7 @@ create table t1(c1 int);
create view v as select c1 from t1;
desc v;
Field Type Null Key Default Extra
c1 int(11) YES NULL
c1 int(11) YES NULL
drop table if exists t1,t2;
drop view if exists v;
create table t1(c1 int);
@ -223,15 +223,15 @@ create table t2(c1 int);
create view v as (select c1 from t1) union (select c1 from t2);
desc v;
Field Type Null Key Default Extra
c1 int(11) YES NULL
c1 int(11) YES NULL
drop table if exists t1;
drop view if exists v;
create table t1(c1 int,c2 int);
create view v as select c1,c2 from t1;
desc v;
Field Type Null Key Default Extra
c1 int(11) YES NULL
c2 int(11) YES NULL
c1 int(11) YES NULL
c2 int(11) YES NULL
alter table t1 drop column c2;
desc v;
ERROR 42S22: View 'view.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
@ -253,13 +253,13 @@ create view vv as select c1,c2 from v;
create or replace view v as select c1 from t1;
desc v;
Field Type Null Key Default Extra
c1 int(11) YES NULL
c1 int(11) YES NULL
desc vv;
ERROR 42S22: View 'view.vv' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
create or replace view vv as select c1 from v;
desc vv;
Field Type Null Key Default Extra
c1 int(11) NO
c1 int(11) NO
drop table if exists t1,t2,t3,t4;
drop view if exists v,vv;
create table t1(c1 int,c2 int);
@ -269,13 +269,13 @@ create table t4(c1 int,c2 int);
create view v as ((select * from t1) union (select c1,c2 from t2)) union (select * from t3);
desc v;
Field Type Null Key Default Extra
c1 int(11) YES NULL
c2 int(11) YES NULL
c1 int(11) YES NULL
c2 int(11) YES NULL
create view vv as (select * from v) union (select * from t4);
desc vv;
Field Type Null Key Default Extra
c1 int(11) NO
c2 int(11) NO
c1 int(11) NO
c2 int(11) NO
drop table if exists t1,t2;
drop view if exists v;
create table t1(c1 int,c2 int);
@ -437,25 +437,25 @@ Outputs & filters:
merge_directions([ASC])
1 - output([t11.a]), filter(nil), rowset=16
access([t11.a]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t11.a]), range(10 ; MAX),
is_index_back=false, is_global_index=false,
range_key([t11.a]), range(10 ; MAX),
range_cond([t11.a > 10])
2 - output([t21.a]), filter(nil), rowset=16
access([t21.a]), partitions(p0)
is_index_back=false, is_global_index=false,
range_key([t21.a]), range(10 ; MAX),
is_index_back=false, is_global_index=false,
range_key([t21.a]), range(10 ; MAX),
range_cond([t21.a > 10])
Used Hint:
-------------------------------------
/*+
*/
Qb name trace:
-------------------------------------
stmt_id:0, stmt_type:T_EXPLAIN
stmt_id:0, stmt_type:T_EXPLAIN
stmt_id:1, SEL$1 > SEL$CFEA49FE > SEL$A7A036C9 > SEL$AC33F27C > SEL$21AFC505
stmt_id:2, SEL$2
Outline Data:
Outline Data:
-------------------------------------
/*+
BEGIN_OUTLINE_DATA

View File

@ -1,28 +1,28 @@
desc oceanbase.__all_virtual_thread;
Field Type Null Key Default Extra
svr_ip varchar(46) NO NULL
svr_port bigint(20) NO NULL
tenant_id bigint(20) NO NULL
tid bigint(20) NO NULL
tname varchar(16) NO NULL
status varchar(32) NO NULL
wait_event varchar(64) NO NULL
latch_wait varchar(16) NO NULL
latch_hold varchar(256) NO NULL
trace_id varchar(40) NO NULL
loop_ts timestamp(6) NO NULL
cgroup_path varchar(256) NO NULL
svr_ip varchar(46) NO NULL
svr_port bigint(20) NO NULL
tenant_id bigint(20) NO NULL
tid bigint(20) NO NULL
tname varchar(16) NO NULL
status varchar(32) NO NULL
wait_event varchar(64) NO NULL
latch_wait varchar(16) NO NULL
latch_hold varchar(256) NO NULL
trace_id varchar(40) NO NULL
loop_ts timestamp(6) NO NULL
cgroup_path varchar(256) NO NULL
desc oceanbase.GV$OB_THREAD;
Field Type Null Key Default Extra
SVR_IP varchar(46) NO NULL
SVR_PORT bigint(20) NO NULL
TENANT_ID bigint(20) NO NULL
TID bigint(20) NO NULL
TNAME varchar(16) NO NULL
STATUS varchar(32) NO NULL
LATCH_WAIT varchar(16) NO NULL
LATCH_HOLD varchar(256) NO NULL
TRACE_ID varchar(40) NO NULL
SVR_IP varchar(46) NO NULL
SVR_PORT bigint(20) NO NULL
TENANT_ID bigint(20) NO NULL
TID bigint(20) NO NULL
TNAME varchar(16) NO NULL
STATUS varchar(32) NO NULL
LATCH_WAIT varchar(16) NO NULL
LATCH_HOLD varchar(256) NO NULL
TRACE_ID varchar(40) NO NULL
select count(1) from oceanbase.__all_virtual_thread where tname = "";
count(1)
0