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

@ -1263,7 +1263,7 @@ int ObLS::get_replica_status(ObReplicaStatus &replica_status)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObMigrationStatus migration_status; ObMigrationStatus migration_status;
ObLSMeta::ObReentrantRLockGuard guard(ls_meta_.lock_); RDLockGuard guard(meta_rwlock_);
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;
LOG_WARN("ls is not inited", K(ret)); LOG_WARN("ls is not inited", K(ret));
@ -1402,6 +1402,60 @@ int ObLS::ObLSInnerTabletIDIter::get_next(common::ObTabletID &tablet_id)
return ret; return ret;
} }
ObLS::RDLockGuard::RDLockGuard(RWLock &lock, const int64_t abs_timeout_us)
: lock_(lock), ret_(OB_SUCCESS), start_ts_(0)
{
ObTimeGuard tg("ObLS::rwlock", LOCK_CONFLICT_WARN_TIME);
if (OB_UNLIKELY(OB_SUCCESS != (ret_ = lock_.rdlock(ObLatchIds::LS_LOCK,
abs_timeout_us)))) {
STORAGE_LOG_RET(WARN, ret_, "Fail to read lock, ", K_(ret));
} else {
start_ts_ = ObTimeUtility::current_time();
}
}
ObLS::RDLockGuard::~RDLockGuard()
{
if (OB_LIKELY(OB_SUCCESS == ret_)) {
if (OB_UNLIKELY(OB_SUCCESS != (ret_ = lock_.unlock()))) {
STORAGE_LOG_RET(WARN, ret_, "Fail to unlock, ", K_(ret));
}
}
const int64_t end_ts = ObTimeUtility::current_time();
if (end_ts - start_ts_ > 5 * 1000 * 1000) {
STORAGE_LOG_RET(WARN, OB_ERR_TOO_MUCH_TIME, "ls lock cost too much time", K_(start_ts),
"cost_us", end_ts - start_ts_, K(lbt()));
}
start_ts_ = INT64_MAX;
}
ObLS::WRLockGuard::WRLockGuard(RWLock &lock, const int64_t abs_timeout_us)
: lock_(lock), ret_(OB_SUCCESS), start_ts_(0)
{
ObTimeGuard tg("ObLS::rwlock", LOCK_CONFLICT_WARN_TIME);
if (OB_UNLIKELY(OB_SUCCESS != (ret_ = lock_.wrlock(ObLatchIds::LS_LOCK,
abs_timeout_us)))) {
STORAGE_LOG_RET(WARN, ret_, "Fail to read lock, ", K_(ret));
} else {
start_ts_ = ObTimeUtility::current_time();
}
}
ObLS::WRLockGuard::~WRLockGuard()
{
if (OB_LIKELY(OB_SUCCESS == ret_)) {
if (OB_UNLIKELY(OB_SUCCESS != (ret_ = lock_.unlock()))) {
STORAGE_LOG_RET(WARN, ret_, "Fail to unlock, ", K_(ret));
}
}
const int64_t end_ts = ObTimeUtility::current_time();
if (end_ts - start_ts_ > 5 * 1000 * 1000) {
STORAGE_LOG_RET(WARN, OB_ERR_TOO_MUCH_TIME, "ls lock cost too much time", K_(start_ts),
"cost_us", end_ts - start_ts_, K(lbt()));
}
start_ts_ = INT64_MAX;
}
int ObLS::block_tx_start() int ObLS::block_tx_start()
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
@ -1470,7 +1524,7 @@ int ObLS::update_tablet_table_store(
ObTabletHandle &handle) ObTabletHandle &handle)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObLSMeta::ObReentrantRLockGuard guard(ls_meta_.lock_); RDLockGuard guard(meta_rwlock_);
return update_tablet_table_store_without_lock_(tablet_id, param, handle); return update_tablet_table_store_without_lock_(tablet_id, param, handle);
} }
@ -1507,7 +1561,7 @@ int ObLS::update_tablet_table_store(
const ObIArray<storage::ObITable *> &tables) const ObIArray<storage::ObITable *> &tables)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObLSMeta::ObReentrantRLockGuard guard(ls_meta_.lock_); RDLockGuard guard(meta_rwlock_);
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;
LOG_WARN("ls hasn't been inited", K(ret)); LOG_WARN("ls hasn't been inited", K(ret));
@ -1533,7 +1587,7 @@ int ObLS::build_ha_tablet_new_table_store(
const ObBatchUpdateTableStoreParam &param) const ObBatchUpdateTableStoreParam &param)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObLSMeta::ObReentrantRLockGuard guard(ls_meta_.lock_); RDLockGuard guard(meta_rwlock_);
const share::ObLSID &ls_id = ls_meta_.ls_id_; const share::ObLSID &ls_id = ls_meta_.ls_id_;
const int64_t rebuild_seq = ls_meta_.get_rebuild_seq(); const int64_t rebuild_seq = ls_meta_.get_rebuild_seq();
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
@ -1559,7 +1613,7 @@ int ObLS::build_new_tablet_from_mds_table(
const share::SCN &flush_scn) const share::SCN &flush_scn)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObLSMeta::ObReentrantRLockGuard guard(ls_meta_.lock_); RDLockGuard guard(meta_rwlock_);
const share::ObLSID &ls_id = ls_meta_.ls_id_; const share::ObLSID &ls_id = ls_meta_.ls_id_;
const int64_t rebuild_seq = ls_meta_.get_rebuild_seq(); const int64_t rebuild_seq = ls_meta_.get_rebuild_seq();
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
@ -1880,7 +1934,7 @@ int ObLS::get_ls_meta_package_and_tablet_ids(const bool check_archive,
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
const bool need_initial_state = false; const bool need_initial_state = false;
ObHALSTabletIDIterator iter(ls_meta_.ls_id_, need_initial_state); ObHALSTabletIDIterator iter(ls_meta_.ls_id_, need_initial_state);
ObLSMeta::ObReentrantRLockGuard guard(ls_meta_.lock_); RDLockGuard guard(meta_rwlock_);
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;
LOG_WARN("ls is not inited", K(ret)); LOG_WARN("ls is not inited", K(ret));
@ -1948,7 +2002,7 @@ int ObLS::get_transfer_scn(share::SCN &scn)
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
share::SCN max_tablet_scn; share::SCN max_tablet_scn;
max_tablet_scn.set_min(); max_tablet_scn.set_min();
ObLSMeta::ObReentrantRLockGuard guard(ls_meta_.lock_); RDLockGuard guard(meta_rwlock_);
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;
LOG_WARN("ls is not inited", K(ret)); LOG_WARN("ls is not inited", K(ret));
@ -2127,7 +2181,7 @@ int ObLS::try_update_upper_trans_version_and_gc_sstable(
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
int tmp_ret = OB_SUCCESS; int tmp_ret = OB_SUCCESS;
ObLSMeta::ObReentrantRLockGuard guard(ls_meta_.lock_); RDLockGuard guard(meta_rwlock_);
bool update_upper_trans_version = true; bool update_upper_trans_version = true;
const share::ObLSID &ls_id = get_ls_id(); const share::ObLSID &ls_id = get_ls_id();
ObMigrationStatus migration_status; ObMigrationStatus migration_status;
@ -2270,7 +2324,7 @@ int ObLS::diagnose(DiagnoseInfo &info) const
int ObLS::inc_update_transfer_scn(const share::SCN &transfer_scn) int ObLS::inc_update_transfer_scn(const share::SCN &transfer_scn)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObLSMeta::ObReentrantWLockGuard guard(ls_meta_.lock_); WRLockGuard guard(meta_rwlock_);
if (OB_FAIL(ret)) { if (OB_FAIL(ret)) {
} else if (OB_FAIL(ls_meta_.inc_update_transfer_scn(transfer_scn))) { } else if (OB_FAIL(ls_meta_.inc_update_transfer_scn(transfer_scn))) {
LOG_WARN("fail to set transfer scn", K(ret), K(transfer_scn), K_(ls_meta)); LOG_WARN("fail to set transfer scn", K(ret), K(transfer_scn), K_(ls_meta));
@ -2287,7 +2341,7 @@ int ObLS::set_migration_status(
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
share::ObLSRestoreStatus restore_status; share::ObLSRestoreStatus restore_status;
ObLSMeta::ObReentrantWLockGuard guard(ls_meta_.lock_); WRLockGuard guard(meta_rwlock_);
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;
@ -2323,7 +2377,7 @@ int ObLS::set_restore_status(
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObMigrationStatus migration_status = ObMigrationStatus::OB_MIGRATION_STATUS_MAX; ObMigrationStatus migration_status = ObMigrationStatus::OB_MIGRATION_STATUS_MAX;
ObLSMeta::ObReentrantWLockGuard guard(ls_meta_.lock_); WRLockGuard guard(meta_rwlock_);
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;
@ -2374,7 +2428,7 @@ int ObLS::set_gc_state(const logservice::LSGCState &gc_state, const share::SCN &
int ObLS::set_ls_rebuild() int ObLS::set_ls_rebuild()
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObLSMeta::ObReentrantWLockGuard guard(ls_meta_.lock_); WRLockGuard guard(meta_rwlock_);
if (IS_NOT_INIT) { if (IS_NOT_INIT) {
ret = OB_NOT_INIT; ret = OB_NOT_INIT;

View File

@ -174,6 +174,7 @@ class ObIComponentFactory;
class ObLS : public common::ObLink class ObLS : public common::ObLink
{ {
public: public:
typedef common::ObLatch RWLock;
friend ObLSLockGuard; friend ObLSLockGuard;
friend class ObFreezer; friend class ObFreezer;
friend class checkpoint::ObDataCheckpoint; friend class checkpoint::ObDataCheckpoint;
@ -195,6 +196,34 @@ public:
private: private:
int64_t pos_; int64_t pos_;
}; };
class RDLockGuard
{
static const int64_t LOCK_CONFLICT_WARN_TIME = 100 * 1000; // 100 ms
public:
[[nodiscard]] explicit RDLockGuard(RWLock &lock, const int64_t abs_timeout_us = INT64_MAX);
~RDLockGuard();
inline int get_ret() const { return ret_; }
private:
RWLock &lock_;
int ret_;
int64_t start_ts_;
private:
DISALLOW_COPY_AND_ASSIGN(RDLockGuard);
};
class WRLockGuard
{
static const int64_t LOCK_CONFLICT_WARN_TIME = 100 * 1000; // 100 ms
public:
[[nodiscard]] explicit WRLockGuard(RWLock &lock, const int64_t abs_timeout_us = INT64_MAX);
~WRLockGuard();
inline int get_ret() const { return ret_; }
private:
RWLock &lock_;
int ret_;
int64_t start_ts_;
private:
DISALLOW_COPY_AND_ASSIGN(WRLockGuard);
};
public: public:
ObLS(); ObLS();
virtual ~ObLS(); virtual ~ObLS();
@ -938,7 +967,8 @@ private:
ObTransferHandler transfer_handler_; ObTransferHandler transfer_handler_;
// Record the dependent transfer information when restarting // Record the dependent transfer information when restarting
ObLSTransferInfo startup_transfer_info_; ObLSTransferInfo startup_transfer_info_;
// this is used for the meta lock, and will be removed later
RWLock meta_rwlock_;
}; };
} }

View File

@ -11,7 +11,7 @@ CREATE TABLE if not exists trade_sequence_000
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists BUSINESS_ACTION_000 CREATE TABLE if not exists BUSINESS_ACTION_000
( (
ACTION_ID int NOT NULL, ACTION_ID int NOT NULL,
TX_ID varchar(128) NOT NULL, TX_ID varchar(128) NOT NULL,
@ -23,7 +23,7 @@ CREATE TABLE if not exists BUSINESS_ACTION_000
primary key (ACTION_ID) primary key (ACTION_ID)
) DEFAULT CHARSET = 'utf8'; ) 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, TX_ID varchar(128) NOT NULL,
STATE VARCHAR(1) NOT NULL, STATE VARCHAR(1) NOT NULL,
@ -35,7 +35,7 @@ CREATE TABLE if not exists BUSINESS_ACTIVITY_000
primary key (TX_ID) primary key (TX_ID)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists NOTIFY_000 CREATE TABLE if not exists NOTIFY_000
( (
ID varchar(34) NOT NULL, ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL, PLUGIN varchar(50) NOT NULL,
@ -56,7 +56,7 @@ CREATE TABLE if not exists NOTIFY_000
CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER); CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER);
CREATE INDEX NOTIFY_PLUGIN_IND ON NOTIFY_000 (PLUGIN, CHANNEL_ENDPOINT); 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, ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL, PLUGIN varchar(50) NOT NULL,
@ -76,7 +76,7 @@ CREATE TABLE if not exists NOTIFY_HISTORY_000
CREATE INDEX NOTIFY_HISTORY_000_BORDER_IND ON NOTIFY_HISTORY_000 (BUSINESS_ORDER); 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 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), TRADE_NO varchar(64),
@ -98,7 +98,7 @@ 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_000_PL_IND ON TIMEOUT_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_TNO_IND ON TIMEOUT_000 (TRADE_NO); 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -116,7 +116,7 @@ CREATE TABLE if not exists TIMEOUT_HISTORY_000
PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE) PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE)
) DEFAULT CHARSET = 'utf8'; ) 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), TRADE_NO varchar(64),
@ -138,7 +138,7 @@ 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 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), TRADE_NO varchar(64),
@ -163,7 +163,7 @@ 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 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, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -213,16 +213,16 @@ CREATE TABLE if not exists TRADE_BASE_000
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (SELLER_ACCOUNT, GMT_CREATE);
CREATE TABLE if not exists TRADE_CHARGE_000 CREATE TABLE if not exists TRADE_CHARGE_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -255,7 +255,7 @@ CREATE TABLE if not exists TRADE_CHARGE_000
CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000 CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_EXT_000 CREATE TABLE if not exists TRADE_EXT_000
( (
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
EXT_INFO varchar(1000), EXT_INFO varchar(1000),
@ -279,7 +279,7 @@ CREATE TABLE if not exists TRADE_EXT_000
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_EXT_000_GMT_IND ON TRADE_EXT_000 (GMT_MODIFIED); 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, BILL_NO varchar(128) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -308,19 +308,19 @@ CREATE TABLE if not exists TRADE_FUND_BILL_000
primary key (TRADE_NO,BILL_NO) primary key (TRADE_NO,BILL_NO)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (PARTNER_ID, GMT_TRADE_CREATE);
CREATE INDEX TRADE_FUND_BILL_000_GMT_IND ON TRADE_FUND_BILL_000 CREATE INDEX TRADE_FUND_BILL_000_GMT_IND ON TRADE_FUND_BILL_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_GOODS_INFO_000 CREATE TABLE if not exists TRADE_GOODS_INFO_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -351,7 +351,7 @@ CREATE TABLE if not exists TRADE_LOGISTICS_000
INVOICE_NO VARCHAR(64), INVOICE_NO VARCHAR(64),
SIGN_VOUCHER_NO VARCHAR(64), SIGN_VOUCHER_NO VARCHAR(64),
TRANSPORT_TYPE int, TRANSPORT_TYPE int,
TRANSPORT_FEE int default 0 NOT NULL, TRANSPORT_FEE int default 0 NOT NULL,
OTHER_FEE int default 0, OTHER_FEE int default 0,
ADDITIONAL_SERVICE VARCHAR(300), ADDITIONAL_SERVICE VARCHAR(300),
LOGISTICS_STATUS VARCHAR(100), LOGISTICS_STATUS VARCHAR(100),
@ -393,7 +393,7 @@ CREATE INDEX TRADE_LOGISTICS_000_GMT_IND ON TRADE_LOGISTICS_000
#这个表修改了IS_READ,原来使用的是CHAR(1) #这个表修改了IS_READ,原来使用的是CHAR(1)
CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000 CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -407,7 +407,7 @@ CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
PRIMARY KEY (TRADE_NO, ID) PRIMARY KEY (TRADE_NO, ID)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_NOTE_000 CREATE TABLE if not exists TRADE_NOTE_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -423,7 +423,7 @@ CREATE TABLE if not exists TRADE_NOTE_000
primary key (TRADE_NO, ID, GMT_CREATE) primary key (TRADE_NO, ID, GMT_CREATE)
)DEFAULT CHARSET = 'utf8'; )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, PARTNER_ID varchar(200) NOT NULL,
OUT_TRADE_NO varchar(64) NOT NULL, OUT_TRADE_NO varchar(64) NOT NULL,
@ -433,7 +433,7 @@ CREATE TABLE if not exists TRADE_OUTTRADE_000
primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM) primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM)
) DEFAULT CHARSET = 'utf8'; ) 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, ID int NOT NULL,
OUT_RELATION_ID varchar(64), OUT_RELATION_ID varchar(64),
@ -455,10 +455,10 @@ CREATE TABLE if not exists TRADE_PAYMENT_CLAUSE_000
CONTEXT varchar(1000), CONTEXT varchar(1000),
primary key (TRADE_NO, OUT_RELATION_ID) primary key (TRADE_NO, OUT_RELATION_ID)
)DEFAULT CHARSET = 'utf8'; )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); (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, ORDER_NO varchar(64) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -486,7 +486,7 @@ CREATE TABLE if not exists TRADE_PAYMENT_ORDER_000
CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000 CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_PROCESS_000 CREATE TABLE if not exists TRADE_PROCESS_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL, TRADE_NO varchar(64) default ' ' NOT NULL,
@ -524,13 +524,13 @@ CREATE TABLE if not exists TRADE_PROCESS_000
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )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); (GMT_RECEIVE_PAY, RECEIVE_FEE);
CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000 CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_REFUND_000 CREATE TABLE if not exists TRADE_REFUND_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -563,18 +563,18 @@ CREATE TABLE if not exists TRADE_REFUND_000
REFUND_FOREX_FEE int, REFUND_FOREX_FEE int,
PRIMARY KEY (TRADE_NO, ID) PRIMARY KEY (TRADE_NO, ID)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (TRADE_EMAIL, GMT_CREATE);
CREATE INDEX TRADE_REFUND_000_GMT_IND ON TRADE_REFUND_000 (GMT_MODIFIED); 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, ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL, TRADE_NO varchar(64) default ' ' NOT NULL,

View File

@ -1,15 +1,15 @@
--disable_warnings --disable_warnings
DROP TABLE if exists trade_sequence_000; DROP TABLE if exists trade_sequence_000;
DROP TABLE if exists BUSINESS_ACTION_000; DROP TABLE if exists BUSINESS_ACTION_000;
DROP TABLE if exists BUSINESS_ACTIVITY_000; DROP TABLE if exists BUSINESS_ACTIVITY_000;
DROP TABLE if exists NOTIFY_000 ; DROP TABLE if exists NOTIFY_000 ;
DROP TABLE if exists NOTIFY_HISTORY_000 ; DROP TABLE if exists NOTIFY_HISTORY_000 ;
DROP TABLE if exists TIMEOUT_000 ; DROP TABLE if exists TIMEOUT_000 ;
DROP TABLE if exists TIMEOUT_HISTORY_000 ; DROP TABLE if exists TIMEOUT_HISTORY_000 ;
DROP TABLE if exists TIMEOUT_LONG_000 ; DROP TABLE if exists TIMEOUT_LONG_000 ;
DROP TABLE if exists TIMEOUT_REMIND_000; DROP TABLE if exists TIMEOUT_REMIND_000;
DROP TABLE if exists TRADE_BASE_000 ; DROP TABLE if exists TRADE_BASE_000 ;
DROP TABLE if exists TRADE_CHARGE_000; DROP TABLE if exists TRADE_CHARGE_000;
DROP TABLE if exists TRADE_EXT_000 ; DROP TABLE if exists TRADE_EXT_000 ;
DROP TABLE if exists TRADE_FUND_BILL_000 ; DROP TABLE if exists TRADE_FUND_BILL_000 ;
DROP TABLE if exists TRADE_GOODS_INFO_000 ; DROP TABLE if exists TRADE_GOODS_INFO_000 ;

View File

@ -18,7 +18,7 @@ if ($merge_stage == 0) {
{ {
--echo failed --echo failed
} }
## check broadcast in freeze_info_detector ## check broadcast in freeze_info_detector
let $__i__= $timeout_s; let $__i__= $timeout_s;
while($__i__ > 0) while($__i__ > 0)

View File

@ -47,33 +47,33 @@ BEGIN
DECLARE i1, i2, i3, i4 TINYINT; DECLARE i1, i2, i3, i4 TINYINT;
DECLARE u1, u2, u3, u4 TINYINT UNSIGNED; DECLARE u1, u2, u3, u4 TINYINT UNSIGNED;
DECLARE d1, d2, d3 DECIMAL(64, 2); DECLARE d1, d2, d3 DECIMAL(64, 2);
SET i1 = 1e200; SET i1 = 1e200;
SET i2 = -1e200; SET i2 = -1e200;
SET i3 = 300; SET i3 = 300;
SET i4 = -300; SET i4 = -300;
SELECT i1, i2, i3, i4; SELECT i1, i2, i3, i4;
SET i1 = 10 * 10 * 10; SET i1 = 10 * 10 * 10;
SET i2 = -10 * 10 * 10; SET i2 = -10 * 10 * 10;
SET i3 = sign(10 * 10) * 10 * 20; SET i3 = sign(10 * 10) * 10 * 20;
SET i4 = sign(-10 * 10) * -10 * 20; SET i4 = sign(-10 * 10) * -10 * 20;
SELECT i1, i2, i3, i4; SELECT i1, i2, i3, i4;
SET u1 = 1e200; SET u1 = 1e200;
SET u2 = -1e200; SET u2 = -1e200;
SET u3 = 300; SET u3 = 300;
SET u4 = -300; SET u4 = -300;
SELECT u1, u2, u3, u4; SELECT u1, u2, u3, u4;
SET u1 = 10 * 10 * 10; SET u1 = 10 * 10 * 10;
SET u2 = -10 * 10 * 10; SET u2 = -10 * 10 * 10;
SET u3 = sign(10 * 10) * 10 * 20; SET u3 = sign(10 * 10) * 10 * 20;
SET u4 = sign(-10 * 10) * -10 * 20; SET u4 = sign(-10 * 10) * -10 * 20;
SELECT u1, u2, u3, u4; SELECT u1, u2, u3, u4;
SET d1 = 1234; SET d1 = 1234;

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, gmt_modified TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
primary key (name) primary key (name)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists BUSINESS_ACTION_000 CREATE TABLE if not exists BUSINESS_ACTION_000
( (
ACTION_ID int NOT NULL, ACTION_ID int NOT NULL,
TX_ID varchar(128) 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), CONTEXT varchar(4000),
primary key (ACTION_ID) primary key (ACTION_ID)
) DEFAULT CHARSET = 'utf8'; ) 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, TX_ID varchar(128) NOT NULL,
STATE VARCHAR(1) NOT NULL, STATE VARCHAR(1) NOT NULL,
@ -64,7 +64,7 @@ PROPAGATION VARCHAR(1),
CONTEXT varchar(2048), CONTEXT varchar(2048),
primary key (TX_ID) primary key (TX_ID)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists NOTIFY_000 CREATE TABLE if not exists NOTIFY_000
( (
ID varchar(34) NOT NULL, ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL, PLUGIN varchar(50) NOT NULL,
@ -83,7 +83,7 @@ primary key (id)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER); CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER);
CREATE INDEX NOTIFY_PLUGIN_IND ON NOTIFY_000 (PLUGIN, CHANNEL_ENDPOINT); 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, ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL, PLUGIN varchar(50) NOT NULL,
@ -102,7 +102,7 @@ PRIMARY KEY (ID)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX NOTIFY_HISTORY_000_BORDER_IND ON NOTIFY_HISTORY_000 (BUSINESS_ORDER); 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 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), 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 IND_BEYOND_TIMEOUT_ETIME ON TIMEOUT_000 (END_TIME);
CREATE INDEX TIMEOUT_000_PL_IND ON TIMEOUT_000 (PRIOR_LEVEL); CREATE INDEX TIMEOUT_000_PL_IND ON TIMEOUT_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_TNO_IND ON TIMEOUT_000 (TRADE_NO); 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64) 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, GMT_OCCUR TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE) PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE)
) DEFAULT CHARSET = 'utf8'; ) 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), 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 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_000_PL_IND ON TIMEOUT_LONG_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_LONG_TNO_IND ON TIMEOUT_LONG_000 (TRADE_NO); 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), 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 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_000_PL_IND ON TIMEOUT_REMIND_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_REMIND_TNO_IND ON TIMEOUT_REMIND_000 (TRADE_NO); 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, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -228,13 +228,13 @@ GOODS_TYPE VARCHAR(4),
GOODS_SUB_TYPE VARCHAR(4), GOODS_SUB_TYPE VARCHAR(4),
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (SELLER_ACCOUNT, GMT_CREATE);
CREATE TABLE if not exists TRADE_CHARGE_000 CREATE TABLE if not exists TRADE_CHARGE_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) 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'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000 CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_EXT_000 CREATE TABLE if not exists TRADE_EXT_000
( (
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
EXT_INFO varchar(1000), EXT_INFO varchar(1000),
@ -288,7 +288,7 @@ PAY_CHANNELS varchar(900),
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_EXT_000_GMT_IND ON TRADE_EXT_000 (GMT_MODIFIED); 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, BILL_NO varchar(128) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -316,15 +316,15 @@ BILL_EXT varchar(200),
PAY_ORDER_NO varchar(64), PAY_ORDER_NO varchar(64),
primary key (TRADE_NO,BILL_NO) primary key (TRADE_NO,BILL_NO)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (PARTNER_ID, GMT_TRADE_CREATE);
CREATE INDEX TRADE_FUND_BILL_000_GMT_IND ON TRADE_FUND_BILL_000 CREATE INDEX TRADE_FUND_BILL_000_GMT_IND ON TRADE_FUND_BILL_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_GOODS_INFO_000 CREATE TABLE if not exists TRADE_GOODS_INFO_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -354,7 +354,7 @@ LOGISTICS_NAME VARCHAR(128),
INVOICE_NO VARCHAR(64), INVOICE_NO VARCHAR(64),
SIGN_VOUCHER_NO VARCHAR(64), SIGN_VOUCHER_NO VARCHAR(64),
TRANSPORT_TYPE int, TRANSPORT_TYPE int,
TRANSPORT_FEE int default 0 NOT NULL, TRANSPORT_FEE int default 0 NOT NULL,
OTHER_FEE int default 0, OTHER_FEE int default 0,
ADDITIONAL_SERVICE VARCHAR(300), ADDITIONAL_SERVICE VARCHAR(300),
LOGISTICS_STATUS VARCHAR(100), LOGISTICS_STATUS VARCHAR(100),
@ -393,7 +393,7 @@ primary key (TRADE_NO, TRADE_OR_REFUND_FLAG, ID)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_LOGISTICS_000_GMT_IND ON TRADE_LOGISTICS_000 CREATE INDEX TRADE_LOGISTICS_000_GMT_IND ON TRADE_LOGISTICS_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000 CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) 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, GMT_CREATE TIMESTAMP(6) default "2012-01-01 12:00:00" NULL,
PRIMARY KEY (TRADE_NO, ID) PRIMARY KEY (TRADE_NO, ID)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_NOTE_000 CREATE TABLE if not exists TRADE_NOTE_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -421,7 +421,7 @@ NOTE_TYPE varchar(100),
REMOTE_MAC varchar(64), REMOTE_MAC varchar(64),
primary key (TRADE_NO, ID, GMT_CREATE) primary key (TRADE_NO, ID, GMT_CREATE)
)DEFAULT CHARSET = 'utf8'; )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, PARTNER_ID varchar(200) NOT NULL,
OUT_TRADE_NO varchar(64) 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, GMT_CREATE TIMESTAMP(6) default "2012-01-01 12:00:00" NOT NULL,
primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM) primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM)
) DEFAULT CHARSET = 'utf8'; ) 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, ID int NOT NULL,
OUT_RELATION_ID varchar(64), OUT_RELATION_ID varchar(64),
@ -452,9 +452,9 @@ MEMO varchar(1000),
CONTEXT varchar(1000), CONTEXT varchar(1000),
primary key (TRADE_NO, OUT_RELATION_ID) primary key (TRADE_NO, OUT_RELATION_ID)
)DEFAULT CHARSET = 'utf8'; )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); (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, ORDER_NO varchar(64) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -480,7 +480,7 @@ primary key (TRADE_NO, ORDER_NO)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000 CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_PROCESS_000 CREATE TABLE if not exists TRADE_PROCESS_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) default ' ' 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, SEND_BACK_FEE int,
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )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); (GMT_RECEIVE_PAY, RECEIVE_FEE);
CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000 CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_REFUND_000 CREATE TABLE if not exists TRADE_REFUND_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) 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, REFUND_FOREX_FEE int,
PRIMARY KEY (TRADE_NO, ID) PRIMARY KEY (TRADE_NO, ID)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (TRADE_EMAIL, GMT_CREATE);
CREATE INDEX TRADE_REFUND_000_GMT_IND ON TRADE_REFUND_000 (GMT_MODIFIED); 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, ID int NOT NULL,
TRADE_NO varchar(64) default ' ' 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", gmt_modified TIMESTAMP(6) default "2012-01-01 12:00:00",
primary key (name) primary key (name)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists BUSINESS_ACTION_000 CREATE TABLE if not exists BUSINESS_ACTION_000
( (
ACTION_ID int NOT NULL, ACTION_ID int NOT NULL,
TX_ID varchar(128) NOT NULL, TX_ID varchar(128) NOT NULL,
@ -49,7 +49,7 @@ GMT_MODIFIED TIMESTAMP NOT NULL,
CONTEXT varchar(4000), CONTEXT varchar(4000),
primary key (ACTION_ID) primary key (ACTION_ID)
) DEFAULT CHARSET = 'utf8'; ) 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, TX_ID varchar(128) NOT NULL,
STATE VARCHAR(1) NOT NULL, STATE VARCHAR(1) NOT NULL,
@ -60,7 +60,7 @@ PROPAGATION VARCHAR(1),
CONTEXT varchar(2048), CONTEXT varchar(2048),
primary key (TX_ID) primary key (TX_ID)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists NOTIFY_000 CREATE TABLE if not exists NOTIFY_000
( (
ID varchar(34) NOT NULL, ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL, PLUGIN varchar(50) NOT NULL,
@ -79,7 +79,7 @@ primary key (id)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER); CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER);
CREATE INDEX NOTIFY_PLUGIN_IND ON NOTIFY_000 (PLUGIN, CHANNEL_ENDPOINT); 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, ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL, PLUGIN varchar(50) NOT NULL,
@ -98,7 +98,7 @@ PRIMARY KEY (ID)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX NOTIFY_HISTORY_000_BORDER_IND ON NOTIFY_HISTORY_000 (BUSINESS_ORDER); 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 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), 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 IND_BEYOND_TIMEOUT_ETIME ON TIMEOUT_000 (END_TIME);
CREATE INDEX TIMEOUT_000_PL_IND ON TIMEOUT_000 (PRIOR_LEVEL); CREATE INDEX TIMEOUT_000_PL_IND ON TIMEOUT_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_TNO_IND ON TIMEOUT_000 (TRADE_NO); 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64) 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", GMT_OCCUR TIMESTAMP(6) default "2012-01-01 12:00:00",
PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE) PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE)
) DEFAULT CHARSET = 'utf8'; ) 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), 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 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_000_PL_IND ON TIMEOUT_LONG_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_LONG_TNO_IND ON TIMEOUT_LONG_000 (TRADE_NO); 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), 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 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_000_PL_IND ON TIMEOUT_REMIND_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_REMIND_TNO_IND ON TIMEOUT_REMIND_000 (TRADE_NO); 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, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -224,13 +224,13 @@ GOODS_TYPE VARCHAR(4),
GOODS_SUB_TYPE VARCHAR(4), GOODS_SUB_TYPE VARCHAR(4),
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (SELLER_ACCOUNT, GMT_CREATE);
CREATE TABLE if not exists TRADE_CHARGE_000 CREATE TABLE if not exists TRADE_CHARGE_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) 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'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000 CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_EXT_000 CREATE TABLE if not exists TRADE_EXT_000
( (
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
EXT_INFO varchar(1000), EXT_INFO varchar(1000),
@ -284,7 +284,7 @@ PAY_CHANNELS varchar(900),
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_EXT_000_GMT_IND ON TRADE_EXT_000 (GMT_MODIFIED); 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, BILL_NO varchar(128) NOT NULL,
TRADE_NO varchar(64) 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 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_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 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, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -346,7 +346,7 @@ LOGISTICS_NAME VARCHAR(128),
INVOICE_NO VARCHAR(64), INVOICE_NO VARCHAR(64),
SIGN_VOUCHER_NO VARCHAR(64), SIGN_VOUCHER_NO VARCHAR(64),
TRANSPORT_TYPE int, TRANSPORT_TYPE int,
TRANSPORT_FEE int default 0 NOT NULL, TRANSPORT_FEE int default 0 NOT NULL,
OTHER_FEE int default 0, OTHER_FEE int default 0,
ADDITIONAL_SERVICE VARCHAR(300), ADDITIONAL_SERVICE VARCHAR(300),
LOGISTICS_STATUS VARCHAR(100), LOGISTICS_STATUS VARCHAR(100),
@ -385,7 +385,7 @@ primary key (TRADE_NO, TRADE_OR_REFUND_FLAG, ID)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_LOGISTICS_000_GMT_IND ON TRADE_LOGISTICS_000 CREATE INDEX TRADE_LOGISTICS_000_GMT_IND ON TRADE_LOGISTICS_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000 CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) 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", GMT_CREATE TIMESTAMP(6) default "2012-01-01 12:00:00",
PRIMARY KEY (TRADE_NO, ID) PRIMARY KEY (TRADE_NO, ID)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_NOTE_000 CREATE TABLE if not exists TRADE_NOTE_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -413,7 +413,7 @@ NOTE_TYPE varchar(100),
REMOTE_MAC varchar(64), REMOTE_MAC varchar(64),
primary key (TRADE_NO, ID, GMT_CREATE) primary key (TRADE_NO, ID, GMT_CREATE)
)DEFAULT CHARSET = 'utf8'; )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, PARTNER_ID varchar(200) NOT NULL,
OUT_TRADE_NO varchar(64) NOT NULL, OUT_TRADE_NO varchar(64) NOT NULL,
@ -422,7 +422,7 @@ TRADE_NO varchar(64) NOT NULL,
GMT_CREATE TIMESTAMP NOT NULL, GMT_CREATE TIMESTAMP NOT NULL,
primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM) primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM)
) DEFAULT CHARSET = 'utf8'; ) 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, ID int NOT NULL,
OUT_RELATION_ID varchar(64), OUT_RELATION_ID varchar(64),
@ -444,9 +444,9 @@ MEMO varchar(1000),
CONTEXT varchar(1000), CONTEXT varchar(1000),
primary key (TRADE_NO, OUT_RELATION_ID) primary key (TRADE_NO, OUT_RELATION_ID)
)DEFAULT CHARSET = 'utf8'; )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); (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, ORDER_NO varchar(64) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -472,7 +472,7 @@ primary key (TRADE_NO, ORDER_NO)
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000 CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_PROCESS_000 CREATE TABLE if not exists TRADE_PROCESS_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) default ' ' 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, SEND_BACK_FEE int,
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )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); (GMT_RECEIVE_PAY, RECEIVE_FEE);
CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000 CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_REFUND_000 CREATE TABLE if not exists TRADE_REFUND_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) 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, REFUND_FOREX_FEE int,
PRIMARY KEY (TRADE_NO, ID) PRIMARY KEY (TRADE_NO, ID)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (TRADE_EMAIL, GMT_CREATE);
CREATE INDEX TRADE_REFUND_000_GMT_IND ON TRADE_REFUND_000 (GMT_MODIFIED); 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, ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL, TRADE_NO varchar(64) default ' ' NOT NULL,

View File

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

View File

@ -1,6 +1,6 @@
set sql_mode=''; set sql_mode='';
drop table if exists t; 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, int_val smallint,
uint_val smallint unsigned, uint_val smallint unsigned,
flt_val float(5, 3), flt_val float(5, 3),

View File

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

View File

@ -46,7 +46,7 @@ Outputs & filters:
affinitize, force partition granule, asc affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1]), filter(nil), rowset=16 4 - output([t1.c2], [t1.c3], [t1.c1]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1]), partitions(p[0-1]) 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 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 5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - 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 force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
drop table t1; 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; 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 affinitize, force partition granule
4 - output([t1.c2], [t1.c3], [t1.c1]), filter(nil), rowset=16 4 - output([t1.c2], [t1.c3], [t1.c1]), filter(nil), rowset=16
access([t1.c2], [t1.c3], [t1.c1]), partitions(p[0-1]) 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 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 5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - 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 force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
drop table t1; 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) 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 force partition granule
6 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 6 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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 7 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16
affinitize, force partition granule, asc affinitize, force partition granule, asc
8 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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; explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c3= t2.c3;
Query Plan Query Plan
@ -166,7 +166,7 @@ Outputs & filters:
force partition granule, asc force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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 5 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
6 - 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 force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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; explain select /*+use_bnl(t1 t2)*/ * from t1 join t2 on t1.c3= t2.c3;
Query Plan Query Plan
@ -204,7 +204,7 @@ Outputs & filters:
force partition granule force partition granule
4 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 4 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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 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 6 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
@ -213,7 +213,7 @@ Outputs & filters:
force partition granule, asc force partition granule, asc
8 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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; explain select /*+use_nl(t1 t2)*/ * from t1 left join t2 on t1.c2= t2.c2;
Query Plan Query Plan
@ -242,7 +242,7 @@ Outputs & filters:
affinitize, force partition granule, asc affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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 5 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
6 - 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 force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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; explain select /*+use_nl(t1 t2)*/ * from t1 left join t2 on t1.c1= t2.c1;
Query Plan Query Plan
@ -283,14 +283,14 @@ Outputs & filters:
force partition granule, asc force partition granule, asc
6 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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 7 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
affinitize, force partition granule affinitize, force partition granule
8 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 8 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 ; MAX), range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN ; MAX),
range_cond([:0 = t2.c1]) 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; explain select /*+use_nl(t1 t2)*/ * from t1 left join t2 on t1.c2= t2.c2 and t1.c3= t2.c3;
Query Plan Query Plan
@ -319,7 +319,7 @@ Outputs & filters:
affinitize, force partition granule, asc affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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 5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - 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 force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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; explain select /*+use_nl(t1 t2)*/ * from t1 left join t2 on t1.c1= t2.c1 and t1.c3= t2.c3;
Query Plan Query Plan
@ -360,14 +360,14 @@ Outputs & filters:
force partition granule, asc force partition granule, asc
6 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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 7 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
affinitize, force partition granule affinitize, force partition granule
8 - output([t2.c1], [t2.c2], [t2.c3]), filter([:1 = t2.c3]), rowset=16 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]) access([t2.c1], [t2.c2], [t2.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([t2.c1], [t2.c2], [t2.c3]), range(MIN ; MAX), range_key([t2.c1], [t2.c2], [t2.c3]), range(MIN ; MAX),
range_cond([:0 = t2.c1]) range_cond([:0 = t2.c1])
explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c2= t2.c2; explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c2= t2.c2;
Query Plan Query Plan
@ -396,7 +396,7 @@ Outputs & filters:
affinitize, force partition granule, asc affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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 5 - output([t2.c2], [t2.c1], [t2.c3]), filter(nil), rowset=16
6 - 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 force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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; explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c1= t2.c1;
Query Plan Query Plan
@ -435,7 +435,7 @@ Outputs & filters:
affinitize, force partition granule affinitize, force partition granule
4 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 4 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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 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 6 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4]), filter(nil), rowset=16
@ -445,7 +445,7 @@ Outputs & filters:
force partition granule, asc force partition granule, asc
9 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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; explain select /*+use_nl(t1 t2)*/ * from t1 join t2 on t1.c2= t2.c2 and t1.c3= t2.c3;
Query Plan Query Plan
@ -474,7 +474,7 @@ Outputs & filters:
affinitize, force partition granule, asc affinitize, force partition granule, asc
4 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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 5 - output([t2.c2], [t2.c3], [t2.c1]), filter(nil), rowset=16
6 - 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 force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16 9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=16
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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); explain select c1 from t11 where c2 not in (select c2 from t11);
Query Plan Query Plan
@ -512,7 +512,7 @@ Outputs & filters:
force partition granule force partition granule
4 - output([t11.c2]), filter(nil), rowset=16 4 - output([t11.c2]), filter(nil), rowset=16
access([t11.c2]), partitions(p[0-4]) 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 range_key([t11.c1]), range(MIN ; MAX)always true
5 - output([t11.c1], [t11.c2]), filter(nil), rowset=16 5 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
6 - 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 force partition granule
8 - output([t11.c1], [t11.c2]), filter(nil), rowset=16 8 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
access([t11.c1], [t11.c2]), partitions(p[0-4]) 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 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)); explain select c1 from t12 where c1 not in (select c1 from t11 where c2 not in (select c2 from t11));
Query Plan Query Plan
@ -567,7 +567,7 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t11.c2]), filter(nil), rowset=16 10 - output([t11.c2]), filter(nil), rowset=16
access([t11.c2]), partitions(p[0-4]) 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 range_key([t11.c1]), range(MIN ; MAX)always true
11 - output([t11.c1], [t11.c2]), filter(nil), rowset=16 11 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
12 - 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 force partition granule
14 - output([t11.c1], [t11.c2]), filter(nil), rowset=16 14 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
access([t11.c1], [t11.c2]), partitions(p[0-4]) 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 range_key([t11.c1]), range(MIN ; MAX)always true
15 - output([t12.c1]), filter(nil), rowset=16 15 - output([t12.c1]), filter(nil), rowset=16
affinitize, force partition granule affinitize, force partition granule
16 - output([t12.c1]), filter(nil), rowset=16 16 - output([t12.c1]), filter(nil), rowset=16
access([t12.c1]), partitions(p[0-2]) 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 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; 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 Query Plan
@ -625,14 +625,14 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t12.c1]), filter(nil), rowset=16 10 - output([t12.c1]), filter(nil), rowset=16
access([t12.c1]), partitions(p[0-2]) 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 range_key([t12.c1]), range(MIN ; MAX)always true
11 - output(nil), filter(nil), rowset=16 11 - output(nil), filter(nil), rowset=16
affinitize, force partition granule affinitize, force partition granule
12 - output(nil), filter(nil), rowset=16 12 - output(nil), filter(nil), rowset=16
access(nil), partitions(p[0-4]) access(nil), 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), range_key([t11.c1]), range(MIN ; MAX),
range_cond([t11.c1 = :0]) 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); explain select count(c1) from t11 group by c1 having c1 in (select t12.c1 from t12 where t11.c1=t12.c2);
Query Plan Query Plan
@ -663,13 +663,13 @@ Outputs & filters:
force partition granule force partition granule
6 - output([t11.c1]), filter(nil), rowset=16 6 - output([t11.c1]), filter(nil), rowset=16
access([t11.c1]), partitions(p[0-4]) 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 range_key([t11.c1]), range(MIN ; MAX)always true
7 - output([t12.c2]), filter(nil), rowset=16 7 - output([t12.c2]), filter(nil), rowset=16
affinitize, force partition granule affinitize, force partition granule
8 - output([t12.c2]), filter([t12.c2 = t12.c1]), rowset=16 8 - output([t12.c2]), filter([t12.c2 = t12.c1]), rowset=16
access([t12.c1], [t12.c2]), partitions(p[0-2]) 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 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)); explain select * from t11 where c1 in (select c1 from t12 where (1 = 0 or c1 > 5));
Query Plan Query Plan
@ -700,15 +700,15 @@ Outputs & filters:
force partition granule force partition granule
6 - output([t12.c1]), filter(nil), rowset=16 6 - output([t12.c1]), filter(nil), rowset=16
access([t12.c1]), partitions(p[0-2]) 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(5 ; MAX), range_key([t12.c1]), range(5 ; MAX),
range_cond([t12.c1 > 5]) range_cond([t12.c1 > 5])
7 - output([t11.c1], [t11.c2]), filter(nil), rowset=16 7 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
affinitize, force partition granule affinitize, force partition granule
8 - output([t11.c1], [t11.c2]), filter(nil), rowset=16 8 - output([t11.c1], [t11.c2]), filter(nil), rowset=16
access([t11.c1], [t11.c2]), partitions(p[0-4]) 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(5 ; MAX), range_key([t11.c1]), range(5 ; MAX),
range_cond([t11.c1 > 5]) 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) 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'), subpartition template( subpartition p_2016_11_02_00 values less than ('2016-11-02'),
@ -749,7 +749,7 @@ Outputs & filters:
force partition granule force partition granule
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16 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]) 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 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 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 6 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16
@ -759,7 +759,7 @@ Outputs & filters:
force partition granule force partition granule
9 - output([t5.c1], [t5.c2], [t5.c3], [t5.c4]), filter(nil), rowset=16 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]) 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 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; explain select /*+use_nl(t4 t5)*/ * from t4 left join t5 on t4.c1= t5.c1;
Query Plan Query Plan
@ -784,12 +784,12 @@ Outputs & filters:
force partition granule force partition granule
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16 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]) 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 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 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]) access([GROUP_ID], [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 ; MAX), range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN ; MAX),
range_cond([:0 = t5.c1]) 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; explain select /*+use_nl(t4 t5)*/ * from t4 join t5 on t4.c2= t5.c2 and t4.c3= t5.c3;
Query Plan Query Plan
@ -815,12 +815,12 @@ Outputs & filters:
conds([t4.c2 = t5.c2], [t4.c3 = t5.c3]), nl_params_(nil), use_batch=false 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 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]) 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 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 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 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]) 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 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; explain select * from t4 left join t5 on t4.c1= t5.c1 and t4.c3 = t5.c3;
Query Plan Query Plan
@ -845,11 +845,11 @@ Outputs & filters:
equal_conds([t4.c1 = t5.c1], [t4.c3 = t5.c3]), other_conds(nil) 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 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]) 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 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 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]) 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 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; explain select /*+use_nl(t4 t5)*/ * from t4 left join t5 on t4.c1= t5.c2 and t4.c3 = t5.c3;
Query Plan Query Plan
@ -875,12 +875,12 @@ Outputs & filters:
conds([t4.c1 = t5.c2], [t4.c3 = t5.c3]), nl_params_(nil), use_batch=false 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 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]) 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 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 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 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]) 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 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; explain select /*+use_nl(t4 t1)*/ * from t4 left join t1 on t4.c1= t1.c1 and t4.c3 = t1.c4;
Query Plan Query Plan
@ -909,7 +909,7 @@ Outputs & filters:
affinitize, force partition granule affinitize, force partition granule
4 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16 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]) 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 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 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 6 - output([t1.c1], [t1.c4], [t1.c2], [t1.c3]), filter(nil), rowset=16
@ -919,7 +919,7 @@ Outputs & filters:
force partition granule, asc force partition granule, asc
9 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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; explain select /*+use_nl(t5 t4)*/ * from t5 left join t4 on t4.c1= t5.c2 and t4.c3 = t5.c3;
Query Plan Query Plan
@ -944,12 +944,12 @@ Outputs & filters:
conds(nil), nl_params_([t5.c2(:0)], [t5.c3(:1)]), use_batch=true 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 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]) 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 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 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]) 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], is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN ; MAX), range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN ; MAX),
range_cond([t4.c1 = :0]) 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; explain select /*+use_nl(t1 t4)*/ * from t1 left join t4 on t4.c1= t1.c1 and t4.c3 = t1.c4;
Query Plan Query Plan
@ -980,14 +980,14 @@ Outputs & filters:
force partition granule, asc force partition granule, asc
6 - output([t1.c2], [t1.c3], [t1.c1], [t1.c4]), filter(nil), rowset=16 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]) 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 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 7 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter(nil), rowset=16
affinitize, force partition granule affinitize, force partition granule
8 - output([t4.c1], [t4.c2], [t4.c3], [t4.c4]), filter([t4.c3 = :1]), rowset=16 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]) 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], is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN ; MAX), range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN ; MAX),
range_cond([t4.c1 = :0]) 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; explain select /*+use_nl(t4 t5)*/ * from t4 left join t5 on t4.c1= t5.c1 and t4.c3 = t5.c3;
Query Plan Query Plan
@ -1012,12 +1012,12 @@ Outputs & filters:
conds(nil), nl_params_([t4.c1(:0)], [t4.c3(:1)]), use_batch=true 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 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]) 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 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 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]) 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], is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN ; MAX), range_key([t5.c1], [t5.c2], [t5.c3]), range(MIN ; MAX),
range_cond([:0 = t5.c1]) 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; 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 Query Plan
@ -1054,7 +1054,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule affinitize, partition wise, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16 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]) 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 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 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) 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 affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16 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]) 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 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 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 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)]) 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 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]) 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 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; 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 Query Plan
@ -1129,7 +1129,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]) 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 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]) 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 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 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) equal_conds([c.c1 = a.c1]), other_conds(nil)
@ -1140,7 +1140,7 @@ Outputs & filters:
force partition granule force partition granule
13 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16 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]) 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 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 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 15 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16
@ -1149,7 +1149,7 @@ Outputs & filters:
force partition granule force partition granule
17 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16 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]) 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 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; 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 Query Plan
@ -1186,7 +1186,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule affinitize, partition wise, force partition granule
4 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16 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]) 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 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 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) 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 affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16 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]) 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 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 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 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)]) 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 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]) 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 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; 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 Query Plan
@ -1253,7 +1253,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule affinitize, partition wise, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16 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]) 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 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 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 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 affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16 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]) 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 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 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 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)]) 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 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]) 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 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; 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 Query Plan
@ -1321,7 +1321,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule affinitize, partition wise, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16 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]) 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 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 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 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 affinitize, partition wise, force partition granule
7 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16 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]) 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 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 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 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)]) 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 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]) 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 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; 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 Query Plan
@ -1389,7 +1389,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule affinitize, partition wise, force partition granule
4 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16 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]) 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 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 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 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 affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16 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]) 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 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 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 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)]) 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 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]) 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 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; 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 Query Plan
@ -1470,7 +1470,7 @@ Outputs & filters:
group([t4.c3]), agg_func([T_FUN_SUM(t4.c2)], [T_FUN_MAX(t4.c4)]) 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 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]) 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 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 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 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 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 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]) 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 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 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]) 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], is_index_back=false, is_global_index=false, filter_before_indexback[false],
range_key([c.c1], [c.c2], [c.c3]), range(MIN ; MAX), range_key([c.c1], [c.c2], [c.c3]), range(MIN ; MAX),
range_cond([:0 = c.c1]) 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; 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 Query Plan
@ -1523,7 +1523,7 @@ Outputs & filters:
affinitize, force partition granule affinitize, force partition granule
4 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16 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]) 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 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 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 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 affinitize, force partition granule
9 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16 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]) 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 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 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 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)]) 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 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]) 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 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; 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 Query Plan
@ -1594,7 +1594,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule affinitize, partition wise, force partition granule
4 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16 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]) 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 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 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 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 affinitize, partition wise, force partition granule
7 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16 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]) 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 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 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 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)]) 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 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]) 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 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; 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 Query Plan
@ -1651,17 +1651,17 @@ Outputs & filters:
equal_conds([b.c1 = c.c1], [b.c3 = c.c3]), other_conds(nil) 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 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]) 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 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 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) 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 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]) 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 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 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]) 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 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; 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 Query Plan
@ -1703,7 +1703,7 @@ Outputs & filters:
affinitize, partition wise, force partition granule affinitize, partition wise, force partition granule
6 - output([c.c1], [c.c2], [c.c3], [c.c4]), filter(nil), rowset=16 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]) 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 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 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) equal_conds([VIEW1.a.c1 = b.c1], [VIEW1.a.c3 = b.c3]), other_conds(nil)
@ -1723,13 +1723,13 @@ Outputs & filters:
force partition granule force partition granule
16 - output([a.c1], [a.c2], [a.c3], [a.c4]), filter(nil), rowset=16 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]) 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 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 17 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16
affinitize, partition wise, force partition granule affinitize, partition wise, force partition granule
18 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16 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]) 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 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 ; 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 Query Plan
@ -1763,7 +1763,7 @@ Outputs & filters:
affinitize, force partition granule affinitize, force partition granule
4 - output([b.c1], [b.c2], [b.c3], [b.c4]), filter(nil), rowset=16 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]) 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 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 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 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)]) 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 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]) 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 range_key([t4.c1], [t4.c2], [t4.c3]), range(MIN,MIN,MIN ; MAX,MAX,MAX)always true
drop database yy; 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) 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))}) values({cast(1, DECIMAL(1, 0)) < cast('2009-12-17 06:03:17', DECIMAL(1, -1))})
Outline Data: Outline Data:
------------------------------------- -------------------------------------
/*+ /*+
BEGIN_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)); 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'; 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 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( create table fin_info_transaction(
info_id varchar(64) primary key, info_id varchar(64) primary key,
inst_id varchar(32), inst_id varchar(32),
business_code varchar(16), business_code varchar(16),
sub_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)); 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; select grp,max(a)+max(grp),max(c) from t1 group by grp order by grp;
grp max(a)+max(grp) max(c) grp max(a)+max(grp) max(c)
NULL NULL NULL NULL
1 2 a 1 2 a
2 5 c 2 5 c
3 9 E 3 9 E

View File

@ -143,7 +143,7 @@ Outputs & filters:
force partition granule force partition granule
6 - output([t8.c15]), filter(nil), rowset=16 6 - output([t8.c15]), filter(nil), rowset=16
access([t8.c15]), partitions(p[0-19]) 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 range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
7 - output([t8.c15]), filter(nil), rowset=16 7 - output([t8.c15]), filter(nil), rowset=16
8 - output([t8.c15]), filter(nil), rowset=16 8 - output([t8.c15]), filter(nil), rowset=16
@ -152,11 +152,11 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t8.c15]), filter(nil), rowset=16 10 - output([t8.c15]), filter(nil), rowset=16
access([t8.c15]), partitions(p[0-19]) 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 range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
11 - output([t8_alias1.c10]), filter(nil), rowset=16 11 - output([t8_alias1.c10]), filter(nil), rowset=16
access([t8_alias1.c10]), partitions(p0) 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 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); (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 c15
@ -192,7 +192,7 @@ Outputs & filters:
force partition granule force partition granule
6 - output([t8.c15]), filter(nil), rowset=16 6 - output([t8.c15]), filter(nil), rowset=16
access([t8.c15]), partitions(p[0-19]) 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 range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
7 - output([t8.c15]), filter(nil), rowset=16 7 - output([t8.c15]), filter(nil), rowset=16
8 - output([t8.c15]), filter(nil), rowset=16 8 - output([t8.c15]), filter(nil), rowset=16
@ -201,11 +201,11 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t8.c15]), filter(nil), rowset=16 10 - output([t8.c15]), filter(nil), rowset=16
access([t8.c15]), partitions(p[0-19]) 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 range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
11 - output([t8_alias1.c10]), filter(nil), rowset=16 11 - output([t8_alias1.c10]), filter(nil), rowset=16
access([t8_alias1.c10]), partitions(p0) 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 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); (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 c15
@ -234,14 +234,14 @@ Outputs & filters:
2 - output([EXCEPT([1])], [cast(EXCEPT([1]), VARCHAR(127))]), filter(nil), rowset=16 2 - output([EXCEPT([1])], [cast(EXCEPT([1]), VARCHAR(127))]), filter(nil), rowset=16
3 - output([t8.c6]), filter([t8.c6 < 1000]), rowset=16 3 - output([t8.c6]), filter([t8.c6 < 1000]), rowset=16
access([t8.c6]), partitions(p0) 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 range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
4 - output([t8.c6]), filter([t8.c6 > -1000]), rowset=16 4 - output([t8.c6]), filter([t8.c6 > -1000]), rowset=16
access([t8.c6]), partitions(p0) 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 range_key([t8.c7], [t8.c6]), range(MIN,MIN ; MAX,MAX)always true
5 - output([t8_alias1.c10]), filter(nil), rowset=16 5 - output([t8_alias1.c10]), filter(nil), rowset=16
access([t8_alias1.c10]), partitions(p0) 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 range_key([t8_alias1.c7], [t8_alias1.c6]), range(MIN,MIN ; MAX,MAX)always true
drop table t1,t2,t3,t4,t5,t6, t8; 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); create table t1(a int primary key ,b int);
desc t1; desc t1;
Field Type Null Key Default Extra Field Type Null Key Default Extra
a int(11) NO PRI NULL a int(11) NO PRI NULL
b int(11) YES NULL b int(11) YES NULL
select * from t1; select * from t1;
a b a b
drop table t1; drop table t1;

View File

@ -376,7 +376,7 @@ Query Plan
Outputs & filters: 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)), 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 / 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) 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))], 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 force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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); 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 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 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]) 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 - 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, / 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 DOUBLE(-1, -1)))), DOUBLE(-1, -1)), DOUBLE(-1, -1)))]), filter(nil), rowset=256
dop=1 dop=1
@ -452,7 +452,7 @@ Outputs & filters:
force partition granule force partition granule
8 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -470,7 +470,7 @@ Query Plan
Outputs & filters: 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)), 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 / 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) 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))], 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 force partition granule
6 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -513,7 +513,7 @@ Query Plan
Outputs & filters: 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)), 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 / 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))], 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 [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 force partition granule
11 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -568,7 +568,7 @@ Query Plan
Outputs & filters: 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)), 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 / 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) 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))], 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 force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -647,7 +647,7 @@ Outputs & filters:
force partition granule force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -672,7 +672,7 @@ Query Plan
Outputs & filters: 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)), 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 / 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) 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))], 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 force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 range_key([t1.c1]), range(MIN ; MAX)always true
10 - output([t1.c1]), filter(nil), rowset=256 10 - output([t1.c1]), filter(nil), rowset=256
11 - output([t1.c1]), filter(nil), rowset=256 11 - output([t1.c1]), filter(nil), rowset=256
@ -709,8 +709,8 @@ Outputs & filters:
force partition granule force partition granule
13 - output([t1.c1]), filter([t1.c2 = 1]), rowset=256 13 - output([t1.c1]), filter([t1.c2 = 1]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1]) 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(NULL ; 1), (1 ; MAX), range_key([t1.c1]), range(NULL ; 1), (1 ; MAX),
range_cond([t1.c1 != 1]) 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; 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 Query Plan
@ -736,53 +736,53 @@ Query Plan
Outputs & filters: 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)), 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 / 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) 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)), 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 / 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]) 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)), 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 / 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 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)), 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 / 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) 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)), 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 / 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)), 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))]) / 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)), 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 / 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], 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, [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]) 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)), 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 / 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)), (#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 / 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)), 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 / 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)), 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))]) / 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)), 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 / 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], 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, [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]) 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)), 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 / 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))], 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))))]) [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 force partition granule
14 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -842,7 +842,7 @@ Outputs & filters:
force partition granule force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -897,7 +897,7 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -952,7 +952,7 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 30]), rowset=256 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]) 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 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; 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 Query Plan
@ -1007,7 +1007,7 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -1062,7 +1062,7 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 12]), rowset=256 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]) 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 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; 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 Query Plan
@ -1117,7 +1117,7 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 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 [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), 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) 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, / 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 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)], 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 force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 12]), rowset=256 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]) 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 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; 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 Query Plan
@ -1249,7 +1249,7 @@ Outputs & filters:
force partition granule force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 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), 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, 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) 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), / 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, 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 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 force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -1374,9 +1374,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1 (#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)], 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 [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) + 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)], / 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 [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)], 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 force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -1441,7 +1441,7 @@ Outputs & filters:
force partition granule force partition granule
9 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -1492,9 +1492,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1 (#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)], 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 [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) + 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)], / 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 [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)], 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 force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -1554,9 +1554,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1 (#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)], 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 [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) + 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)], / 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 [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)], 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 force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -1616,9 +1616,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1 (#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)], 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 [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) + 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)], / 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 [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)], 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 force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 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; 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 Query Plan
@ -1678,9 +1678,9 @@ Outputs & filters:
(#keys=1, [t1.c2]), dop=1 (#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)], 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 [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) + 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)], / 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 [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)], 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 force partition granule
10 - output([t1.c1], [t1.c2], [t1.c3]), filter([t1.c2 < 10]), rowset=256 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]) 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 range_key([t1.c1]), range(MIN ; MAX)always true
set @@ob_enable_transformation=default; 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; 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 force partition granule
10 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256 10 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1]) 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 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); 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 Query Plan
@ -1769,7 +1769,7 @@ Outputs & filters:
force partition granule force partition granule
4 - output([t1.c1]), filter(nil), rowset=256 4 - output([t1.c1]), filter(nil), rowset=256
access([t1.c1]), partitions(p[0-1]) 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 range_key([t1.c1]), range(MIN ; MAX)always true
5 - output([VIEW1.avg(c1)]), filter(nil), rowset=256 5 - output([VIEW1.avg(c1)]), filter(nil), rowset=256
6 - 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 force partition granule
17 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256 17 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1]) 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 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); 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 Query Plan
@ -1842,7 +1842,7 @@ Outputs & filters:
force partition granule force partition granule
9 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256 9 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1]) 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 range_key([t1.c1]), range(MIN ; MAX)always true
10 - output([UNION([1])]), filter(nil), rowset=256 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 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 force partition granule
4 - output([t1.c1]), filter(nil), rowset=256 4 - output([t1.c1]), filter(nil), rowset=256
access([t1.c1]), partitions(p[0-1]) 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 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 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) limit(1), offset(nil)
@ -1921,7 +1921,7 @@ Outputs & filters:
force partition granule force partition granule
15 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256 15 - output([t1.c1], [t1.c2]), filter([t1.c2 < 10]), rowset=256
access([t1.c1], [t1.c2]), partitions(p[0-1]) 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 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; 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 Query Plan
@ -1967,7 +1967,7 @@ Outputs & filters:
affinitize, force partition granule affinitize, force partition granule
4 - output([t3.c1], [t3.c2], [t3.c3]), filter(nil), rowset=256 4 - output([t3.c1], [t3.c2], [t3.c3]), filter(nil), rowset=256
access([t3.c1], [t3.c2], [t3.c3]), partitions(p[0-1]) 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 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)], 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 [a.sum(c3)/sum(c1)]), filter(nil), rowset=256
@ -1981,7 +1981,7 @@ Outputs & filters:
affinitize, force partition granule affinitize, force partition granule
9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=256 9 - output([t2.c1], [t2.c2], [t2.c3]), filter(nil), rowset=256
access([t2.c1], [t2.c2], [t2.c3]), partitions(p[0-1]) 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 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 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 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 force partition granule
23 - output([t1.c1], [t1.c3], [t1.c2]), filter(nil), rowset=256 23 - output([t1.c1], [t1.c3], [t1.c2]), filter(nil), rowset=256
access([t1.c1], [t1.c3], [t1.c2]), partitions(p[0-1]) 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 range_key([t1.c1]), range(MIN ; MAX)always true
drop table t1; drop table t1;
drop table t2; 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; create view view_v8 as select c1+c2 from table_t8;
desc view_v8; desc view_v8;
Field Type Null Key Default Extra 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; create view view_v9 as select c1+c2 from table_t8 a;
desc view_v9; desc view_v9;
Field Type Null Key Default Extra Field Type Null Key Default Extra
c1+c2 bigint(12) YES NULL c1+c2 bigint(12) YES NULL
drop table table_t8; drop table table_t8;
drop view view_v8; drop view view_v8;
drop view view_v9; drop view view_v9;

View File

@ -215,7 +215,7 @@ create table t1(c1 int);
create view v as select c1 from t1; create view v as select c1 from t1;
desc v; desc v;
Field Type Null Key Default Extra Field Type Null Key Default Extra
c1 int(11) YES NULL c1 int(11) YES NULL
drop table if exists t1,t2; drop table if exists t1,t2;
drop view if exists v; drop view if exists v;
create table t1(c1 int); 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); create view v as (select c1 from t1) union (select c1 from t2);
desc v; desc v;
Field Type Null Key Default Extra Field Type Null Key Default Extra
c1 int(11) YES NULL c1 int(11) YES NULL
drop table if exists t1; drop table if exists t1;
drop view if exists v; drop view if exists v;
create table t1(c1 int,c2 int); create table t1(c1 int,c2 int);
create view v as select c1,c2 from t1; create view v as select c1,c2 from t1;
desc v; desc v;
Field Type Null Key Default Extra Field Type Null Key Default Extra
c1 int(11) YES NULL c1 int(11) YES NULL
c2 int(11) YES NULL c2 int(11) YES NULL
alter table t1 drop column c2; alter table t1 drop column c2;
desc v; 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 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; create or replace view v as select c1 from t1;
desc v; desc v;
Field Type Null Key Default Extra Field Type Null Key Default Extra
c1 int(11) YES NULL c1 int(11) YES NULL
desc vv; 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 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; create or replace view vv as select c1 from v;
desc vv; desc vv;
Field Type Null Key Default Extra Field Type Null Key Default Extra
c1 int(11) NO c1 int(11) NO
drop table if exists t1,t2,t3,t4; drop table if exists t1,t2,t3,t4;
drop view if exists v,vv; drop view if exists v,vv;
create table t1(c1 int,c2 int); 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); create view v as ((select * from t1) union (select c1,c2 from t2)) union (select * from t3);
desc v; desc v;
Field Type Null Key Default Extra Field Type Null Key Default Extra
c1 int(11) YES NULL c1 int(11) YES NULL
c2 int(11) YES NULL c2 int(11) YES NULL
create view vv as (select * from v) union (select * from t4); create view vv as (select * from v) union (select * from t4);
desc vv; desc vv;
Field Type Null Key Default Extra Field Type Null Key Default Extra
c1 int(11) NO c1 int(11) NO
c2 int(11) NO c2 int(11) NO
drop table if exists t1,t2; drop table if exists t1,t2;
drop view if exists v; drop view if exists v;
create table t1(c1 int,c2 int); create table t1(c1 int,c2 int);
@ -437,25 +437,25 @@ Outputs & filters:
merge_directions([ASC]) merge_directions([ASC])
1 - output([t11.a]), filter(nil), rowset=16 1 - output([t11.a]), filter(nil), rowset=16
access([t11.a]), partitions(p0) access([t11.a]), partitions(p0)
is_index_back=false, is_global_index=false, is_index_back=false, is_global_index=false,
range_key([t11.a]), range(10 ; MAX), range_key([t11.a]), range(10 ; MAX),
range_cond([t11.a > 10]) range_cond([t11.a > 10])
2 - output([t21.a]), filter(nil), rowset=16 2 - output([t21.a]), filter(nil), rowset=16
access([t21.a]), partitions(p0) access([t21.a]), partitions(p0)
is_index_back=false, is_global_index=false, is_index_back=false, is_global_index=false,
range_key([t21.a]), range(10 ; MAX), range_key([t21.a]), range(10 ; MAX),
range_cond([t21.a > 10]) range_cond([t21.a > 10])
Used Hint: Used Hint:
------------------------------------- -------------------------------------
/*+ /*+
*/ */
Qb name trace: 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:1, SEL$1 > SEL$CFEA49FE > SEL$A7A036C9 > SEL$AC33F27C > SEL$21AFC505
stmt_id:2, SEL$2 stmt_id:2, SEL$2
Outline Data: Outline Data:
------------------------------------- -------------------------------------
/*+ /*+
BEGIN_OUTLINE_DATA BEGIN_OUTLINE_DATA

View File

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

View File

@ -24,3 +24,4 @@ select /* QUERY_TIMEOUT(15000000) */ id from notify_000 where gmt_create <= cur
select /* QUERY_TIMEOUT(15000000) */ id, business_order, business_type from notify_000 where gmt_create <= current_timestamp() AND gmt_create >= date_sub(current_timestamp(), INTERVAL 6 MINUTE) AND ((status = 'N') AND (gmt_modify < current_timestamp())) limit 1; select /* QUERY_TIMEOUT(15000000) */ id, business_order, business_type from notify_000 where gmt_create <= current_timestamp() AND gmt_create >= date_sub(current_timestamp(), INTERVAL 6 MINUTE) AND ((status = 'N') AND (gmt_modify < current_timestamp())) limit 1;
select id, plugin, plugin_host, parameter, group_no, status, gmt_create, gmt_local_create, gmt_modify, iw_user_id, channel_endpoint, business_order, business_type from notify_000 where (iw_user_id ='1111') and (gmt_create < current_timestamp()) and (gmt_create >= current_timestamp()); select id, plugin, plugin_host, parameter, group_no, status, gmt_create, gmt_local_create, gmt_modify, iw_user_id, channel_endpoint, business_order, business_type from notify_000 where (iw_user_id ='1111') and (gmt_create < current_timestamp()) and (gmt_create >= current_timestamp());
delete from notify_history_000 where ((group_no = (- 1)) AND (iw_user_id = '1111')); delete from notify_history_000 where ((group_no = (- 1)) AND (iw_user_id = '1111'));

View File

@ -8,16 +8,16 @@ set @@session.explicit_defaults_for_timestamp=off;
# #
--disable_warnings --disable_warnings
DROP TABLE if exists trade_sequence_000; DROP TABLE if exists trade_sequence_000;
DROP TABLE if exists BUSINESS_ACTION_000; DROP TABLE if exists BUSINESS_ACTION_000;
DROP TABLE if exists BUSINESS_ACTIVITY_000; DROP TABLE if exists BUSINESS_ACTIVITY_000;
DROP TABLE if exists NOTIFY_000 ; DROP TABLE if exists NOTIFY_000 ;
DROP TABLE if exists NOTIFY_HISTORY_000 ; DROP TABLE if exists NOTIFY_HISTORY_000 ;
DROP TABLE if exists TIMEOUT_000 ; DROP TABLE if exists TIMEOUT_000 ;
DROP TABLE if exists TIMEOUT_HISTORY_000 ; DROP TABLE if exists TIMEOUT_HISTORY_000 ;
DROP TABLE if exists TIMEOUT_LONG_000 ; DROP TABLE if exists TIMEOUT_LONG_000 ;
DROP TABLE if exists TIMEOUT_REMIND_000; DROP TABLE if exists TIMEOUT_REMIND_000;
DROP TABLE if exists TRADE_BASE_000 ; DROP TABLE if exists TRADE_BASE_000 ;
DROP TABLE if exists TRADE_CHARGE_000; DROP TABLE if exists TRADE_CHARGE_000;
DROP TABLE if exists TRADE_EXT_000 ; DROP TABLE if exists TRADE_EXT_000 ;
DROP TABLE if exists TRADE_FUND_BILL_000 ; DROP TABLE if exists TRADE_FUND_BILL_000 ;
DROP TABLE if exists TRADE_GOODS_INFO_000 ; DROP TABLE if exists TRADE_GOODS_INFO_000 ;
@ -51,7 +51,7 @@ CREATE TABLE if not exists trade_sequence_000
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists BUSINESS_ACTION_000 CREATE TABLE if not exists BUSINESS_ACTION_000
( (
ACTION_ID int NOT NULL, ACTION_ID int NOT NULL,
TX_ID varchar(128) NOT NULL, TX_ID varchar(128) NOT NULL,
@ -63,7 +63,7 @@ CREATE TABLE if not exists BUSINESS_ACTION_000
primary key (ACTION_ID) primary key (ACTION_ID)
) DEFAULT CHARSET = 'utf8'; ) 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, TX_ID varchar(128) NOT NULL,
STATE VARCHAR(1) NOT NULL, STATE VARCHAR(1) NOT NULL,
@ -75,7 +75,7 @@ CREATE TABLE if not exists BUSINESS_ACTIVITY_000
primary key (TX_ID) primary key (TX_ID)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists NOTIFY_000 CREATE TABLE if not exists NOTIFY_000
( (
ID varchar(34) NOT NULL, ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL, PLUGIN varchar(50) NOT NULL,
@ -96,7 +96,7 @@ CREATE TABLE if not exists NOTIFY_000
CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER); CREATE INDEX NOTIFY_BUSINESS_ORDER1_IND ON NOTIFY_000 (BUSINESS_ORDER);
CREATE INDEX NOTIFY_PLUGIN_IND ON NOTIFY_000 (PLUGIN, CHANNEL_ENDPOINT); 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, ID varchar(34) NOT NULL,
PLUGIN varchar(50) NOT NULL, PLUGIN varchar(50) NOT NULL,
@ -116,7 +116,7 @@ CREATE TABLE if not exists NOTIFY_HISTORY_000
CREATE INDEX NOTIFY_HISTORY_000_BORDER_IND ON NOTIFY_HISTORY_000 (BUSINESS_ORDER); 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 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), TRADE_NO varchar(64),
@ -138,7 +138,7 @@ 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_000_PL_IND ON TIMEOUT_000 (PRIOR_LEVEL);
CREATE INDEX TIMEOUT_TNO_IND ON TIMEOUT_000 (TRADE_NO); 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -156,7 +156,7 @@ CREATE TABLE if not exists TIMEOUT_HISTORY_000
PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE) PRIMARY KEY (JOB_ID, TRADE_NO, ACTION_TYPE)
) DEFAULT CHARSET = 'utf8'; ) 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), TRADE_NO varchar(64),
@ -178,7 +178,7 @@ 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 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, JOB_ID varchar(32) NOT NULL,
TRADE_NO varchar(64), TRADE_NO varchar(64),
@ -203,7 +203,7 @@ 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 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, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -253,16 +253,16 @@ CREATE TABLE if not exists TRADE_BASE_000
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (SELLER_ACCOUNT, GMT_CREATE);
CREATE TABLE if not exists TRADE_CHARGE_000 CREATE TABLE if not exists TRADE_CHARGE_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -295,7 +295,7 @@ CREATE TABLE if not exists TRADE_CHARGE_000
CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000 CREATE INDEX TRADE_CHARGE_000_GMT_IND ON TRADE_CHARGE_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_EXT_000 CREATE TABLE if not exists TRADE_EXT_000
( (
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
EXT_INFO varchar(1000), EXT_INFO varchar(1000),
@ -319,7 +319,7 @@ CREATE TABLE if not exists TRADE_EXT_000
)DEFAULT CHARSET = 'utf8'; )DEFAULT CHARSET = 'utf8';
CREATE INDEX TRADE_EXT_000_GMT_IND ON TRADE_EXT_000 (GMT_MODIFIED); 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, BILL_NO varchar(128) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -356,7 +356,7 @@ CREATE INDEX TRADE_FUND_BILL_PTG_IND ON TRADE_FUND_BILL_000 (PARTNER_ID, GMT_TRA
CREATE INDEX TRADE_FUND_BILL_000_GMT_IND ON TRADE_FUND_BILL_000(GMT_MODIFIED); 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, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -387,7 +387,7 @@ CREATE TABLE if not exists TRADE_LOGISTICS_000
INVOICE_NO VARCHAR(64), INVOICE_NO VARCHAR(64),
SIGN_VOUCHER_NO VARCHAR(64), SIGN_VOUCHER_NO VARCHAR(64),
TRANSPORT_TYPE int, TRANSPORT_TYPE int,
TRANSPORT_FEE int default 0 NOT NULL, TRANSPORT_FEE int default 0 NOT NULL,
OTHER_FEE int default 0, OTHER_FEE int default 0,
ADDITIONAL_SERVICE VARCHAR(300), ADDITIONAL_SERVICE VARCHAR(300),
LOGISTICS_STATUS VARCHAR(100), LOGISTICS_STATUS VARCHAR(100),
@ -429,7 +429,7 @@ CREATE INDEX TRADE_LOGISTICS_000_GMT_IND ON TRADE_LOGISTICS_000
#这个表修改了IS_READ,原来使用的是CHAR(1) #这个表修改了IS_READ,原来使用的是CHAR(1)
CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000 CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -443,7 +443,7 @@ CREATE TABLE if not exists TRADE_MESSAGE_BOARD_000
PRIMARY KEY (TRADE_NO, ID) PRIMARY KEY (TRADE_NO, ID)
) DEFAULT CHARSET = 'utf8'; ) DEFAULT CHARSET = 'utf8';
CREATE TABLE if not exists TRADE_NOTE_000 CREATE TABLE if not exists TRADE_NOTE_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -459,7 +459,7 @@ CREATE TABLE if not exists TRADE_NOTE_000
primary key (TRADE_NO, ID, GMT_CREATE) primary key (TRADE_NO, ID, GMT_CREATE)
)DEFAULT CHARSET = 'utf8'; )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, PARTNER_ID varchar(200) NOT NULL,
OUT_TRADE_NO varchar(64) NOT NULL, OUT_TRADE_NO varchar(64) NOT NULL,
@ -469,7 +469,7 @@ CREATE TABLE if not exists TRADE_OUTTRADE_000
primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM) primary key (OUT_TRADE_NO, PARTNER_ID, TRADE_FROM)
) DEFAULT CHARSET = 'utf8'; ) 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, ID int NOT NULL,
OUT_RELATION_ID varchar(64), OUT_RELATION_ID varchar(64),
@ -491,10 +491,10 @@ CREATE TABLE if not exists TRADE_PAYMENT_CLAUSE_000
CONTEXT varchar(1000), CONTEXT varchar(1000),
primary key (TRADE_NO, OUT_RELATION_ID) primary key (TRADE_NO, OUT_RELATION_ID)
)DEFAULT CHARSET = 'utf8'; )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); (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, ORDER_NO varchar(64) NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -522,7 +522,7 @@ CREATE TABLE if not exists TRADE_PAYMENT_ORDER_000
CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000 CREATE INDEX TRADE_PAYMENT_ORD_000_GM_IND ON TRADE_PAYMENT_ORDER_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_PROCESS_000 CREATE TABLE if not exists TRADE_PROCESS_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL, TRADE_NO varchar(64) default ' ' NOT NULL,
@ -560,13 +560,13 @@ CREATE TABLE if not exists TRADE_PROCESS_000
PRIMARY KEY (TRADE_NO) PRIMARY KEY (TRADE_NO)
)DEFAULT CHARSET = 'utf8'; )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); (GMT_RECEIVE_PAY, RECEIVE_FEE);
CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000 CREATE INDEX TRADE_PROCESS_GMT_IND ON TRADE_PROCESS_000
(GMT_MODIFIED); (GMT_MODIFIED);
CREATE TABLE if not exists TRADE_REFUND_000 CREATE TABLE if not exists TRADE_REFUND_000
( (
ID int NOT NULL, ID int NOT NULL,
TRADE_NO varchar(64) NOT NULL, TRADE_NO varchar(64) NOT NULL,
@ -599,18 +599,18 @@ CREATE TABLE if not exists TRADE_REFUND_000
REFUND_FOREX_FEE int, REFUND_FOREX_FEE int,
PRIMARY KEY (TRADE_NO, ID) PRIMARY KEY (TRADE_NO, ID)
)DEFAULT CHARSET = 'utf8'; )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); (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); (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); (TRADE_EMAIL, GMT_CREATE);
CREATE INDEX TRADE_REFUND_000_GMT_IND ON TRADE_REFUND_000 (GMT_MODIFIED); 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, ID int NOT NULL,
TRADE_NO varchar(64) default ' ' NOT NULL, TRADE_NO varchar(64) default ' ' NOT NULL,
@ -730,16 +730,16 @@ CREATE INDEX EXTERFACE_INVOKE_000_ID_IND ON EXTERFACE_INVOKE_000(ID);
--disable_warnings --disable_warnings
DROP TABLE if exists trade_sequence_000; DROP TABLE if exists trade_sequence_000;
DROP TABLE if exists BUSINESS_ACTION_000; DROP TABLE if exists BUSINESS_ACTION_000;
DROP TABLE if exists BUSINESS_ACTIVITY_000; DROP TABLE if exists BUSINESS_ACTIVITY_000;
DROP TABLE if exists NOTIFY_000 ; DROP TABLE if exists NOTIFY_000 ;
DROP TABLE if exists NOTIFY_HISTORY_000 ; DROP TABLE if exists NOTIFY_HISTORY_000 ;
DROP TABLE if exists TIMEOUT_000 ; DROP TABLE if exists TIMEOUT_000 ;
DROP TABLE if exists TIMEOUT_HISTORY_000 ; DROP TABLE if exists TIMEOUT_HISTORY_000 ;
DROP TABLE if exists TIMEOUT_LONG_000 ; DROP TABLE if exists TIMEOUT_LONG_000 ;
DROP TABLE if exists TIMEOUT_REMIND_000; DROP TABLE if exists TIMEOUT_REMIND_000;
DROP TABLE if exists TRADE_BASE_000 ; DROP TABLE if exists TRADE_BASE_000 ;
DROP TABLE if exists TRADE_CHARGE_000; DROP TABLE if exists TRADE_CHARGE_000;
DROP TABLE if exists TRADE_EXT_000 ; DROP TABLE if exists TRADE_EXT_000 ;
DROP TABLE if exists TRADE_FUND_BILL_000 ; DROP TABLE if exists TRADE_FUND_BILL_000 ;
DROP TABLE if exists TRADE_GOODS_INFO_000 ; DROP TABLE if exists TRADE_GOODS_INFO_000 ;

View File

@ -33,3 +33,6 @@ select c5+1 c51,c6 c61,c7+1 c71 from t1 where c1=1 and c2='s' and c3=1.5;
select c5+1 c51,c6 c61,c7+1 c71 from t1 where c1=1 and c2='s' and c3=1.5 and c5 in (1,2,3); select c5+1 c51,c6 c61,c7+1 c71 from t1 where c1=1 and c2='s' and c3=1.5 and c5 in (1,2,3);
drop table t1; drop table t1;

View File

@ -32,7 +32,7 @@ select c1 as a1,c2 as a2 from t1 group by a2 having a1>0 order by a1;
select c1 as a1,c2 as a2 from t1 group by a2 having a1>0 order by a2; select c1 as a1,c2 as a2 from t1 group by a2 having a1>0 order by a2;
# select expr # select expr
select c1+c2 as total from t1 order by total; select c1+c2 as total from t1 order by total;
select c1, c1+c2 as total from t1 group by total order by c1; select c1, c1+c2 as total from t1 group by total order by c1;
select c1, c1+c2 as total from t1 group by total having c1>2 order by c1 desc; select c1, c1+c2 as total from t1 group by total having c1>2 order by c1 desc;
@ -42,3 +42,6 @@ select c1, c1+c2 as total from t1 group by total having c1>2 order by c1 desc;
select c1 as a1, c2 as a2 from t1 where c1>1; select c1 as a1, c2 as a2 from t1 where c1>1;
select c1 as a1, c2 as a2 from t1 where c2>1; select c1 as a1, c2 as a2 from t1 where c2>1;
select c1,c1+c2 as a1 from t1 where c1+c2>2; select c1,c1+c2 as a1 from t1 where c1+c2>2;

View File

@ -14,7 +14,7 @@ create table t1(c1 int primary key, c2 int);
insert into t1 values(1,1),(2,2),(3,3); insert into t1 values(1,1),(2,2),(3,3);
let $cnt=30; let $cnt=30;
while($cnt) while($cnt)
{ {
select * from t1 as t2 where c1=1; select * from t1 as t2 where c1=1;
dec $cnt; dec $cnt;

View File

@ -6,7 +6,7 @@ set @@session.explicit_defaults_for_timestamp=off;
## update ## update
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
create table t1(a bigint primary key , b bigint); create table t1(a bigint primary key , b bigint);
@ -21,7 +21,7 @@ select * from t1;
## delete ## delete
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
create table t1(a bigint primary key , b bigint); create table t1(a bigint primary key , b bigint);
@ -31,3 +31,4 @@ delete from t1 WHERE ( a = 1 ) OR (( b = 3 ) AND ( a = 2 )) order by a desc limi
select * from t1; select * from t1;
delete from t1 WHERE ( a = 1 ) OR (( b = 3 ) AND ( a = 2 )) order by a desc; delete from t1 WHERE ( a = 1 ) OR (( b = 3 ) AND ( a = 2 )) order by a desc;
select * from t1; select * from t1;

View File

@ -19,3 +19,5 @@ commit;
set autocommit=1; set autocommit=1;
select * from t1; select * from t1;
disconnect conn1; disconnect conn1;

View File

@ -37,3 +37,5 @@ select c1 as c1, c2 as c1 from tt1 where c1<4;
#show columns from t1 like 'c1'; #show columns from t1 like 'c1';
show columns from tt1; show columns from tt1;
#show columns from t1 like '%c%'; #show columns from t1 like '%c%';

View File

@ -94,17 +94,17 @@ drop table a1;
#CREATE TABLE t2 (a int); #CREATE TABLE t2 (a int);
#INSERT INTO t2 VALUES (1),(2); #INSERT INTO t2 VALUES (1),(2);
# #
#SELECT a, #SELECT a,
# (SELECT COUNT(*) FROM t1 # (SELECT COUNT(*) FROM t1
# WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x # WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x
#FROM t2 ORDER BY a; #FROM t2 ORDER BY a;
# #
--disable_result_log --disable_result_log
#EXPLAIN EXTENDED #EXPLAIN EXTENDED
--enable_result_log --enable_result_log
#SELECT a, #SELECT a,
# (SELECT COUNT(*) FROM t1 # (SELECT COUNT(*) FROM t1
# WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x # WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x
#FROM t2 ORDER BY a; #FROM t2 ORDER BY a;
# #
#DROP TABLE t1,t2; #DROP TABLE t1,t2;
@ -113,7 +113,7 @@ drop table a1;
## Bug #39353: Multiple conditions on timestamp column crashes server ## Bug #39353: Multiple conditions on timestamp column crashes server
## ##
# #
#CREATE TABLE t1 (a TIMESTAMP); #CREATE TABLE t1 (a TIMESTAMP);
#INSERT INTO t1 VALUES (NOW()),(NOW()),(NOW()); #INSERT INTO t1 VALUES (NOW()),(NOW()),(NOW());
#SELECT * FROM t1 WHERE a > '2008-01-01' AND a = '0000-00-00'; #SELECT * FROM t1 WHERE a > '2008-01-01' AND a = '0000-00-00';
#DROP TABLE t1; #DROP TABLE t1;

View File

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

View File

@ -5,7 +5,7 @@ set @@session.explicit_defaults_for_timestamp=off;
#owner: linlin.xll #owner: linlin.xll
#owner group: sql2 #owner group: sql2
#description: #description:
#tags: join,optimizer #tags: join,optimizer
--disable_warnings --disable_warnings
drop database if exists yy; drop database if exists yy;

View File

@ -16,7 +16,7 @@ let $a=abcdefghij;
let $p=abcdefghij; let $p=abcdefghij;
let $cnt=1000; let $cnt=1000;
while($cnt) while($cnt)
{ {
let $a=$a$p; let $a=$a$p;
dec $cnt; dec $cnt;
} }

View File

@ -24,7 +24,7 @@ insert into t4 values(1,0),(2,0),(3,1),(4,1);
select * from t1 except select * from t1; select * from t1 except select * from t1;
--error 1064 --error 1064
select * from t1 except all select * from t1; select * from t1 except all select * from t1;
#partial same #partial same
select * from t1 except select * from t2; select * from t1 except select * from t2;
--error 1064 --error 1064
select * from t1 except all select * from t2; select * from t1 except all select * from t2;
@ -93,3 +93,5 @@ select c2 from t5 except all select c2 from t6;
drop table t1,t2,t3,t4,t5,t6; drop table t1,t2,t3,t4,t5,t6;

View File

@ -43,9 +43,9 @@ SELECT INFLUX_ID FROM fin_settle_serial_map WHERE FINANCE_EXCHANGE_CODE IN ('EX
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)); 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'; 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';
## table 5 fin_info_transaction ## table 5 fin_info_transaction
create table fin_info_transaction( create table fin_info_transaction(
info_id varchar(64) primary key, info_id varchar(64) primary key,
inst_id varchar(32), inst_id varchar(32),
business_code varchar(16), business_code varchar(16),
sub_business_code varchar(16), sub_business_code varchar(16),
@ -76,7 +76,7 @@ gmt_create datetime,
gmt_modified datetime, gmt_modified datetime,
primary key(inst_id, term_batch_no, inst_merchant_no, term_trace_no, inst_terminal_no) primary key(inst_id, term_batch_no, inst_merchant_no, term_trace_no, inst_terminal_no)
); );
#selects to add #selects to add
## table 7 fin_request_no_unique ## table 7 fin_request_no_unique
@ -141,7 +141,7 @@ gmt_modified datetime
select influx_id, org_influx_id, inst_id, business_code, sub_business_code, exchange_type, finance_exchange_code, settle_serial_no, payer_account_no, exchange_amount, exchange_currency, account_amount, account_currency, settle_amount, settle_currency, settle_status, exchange_status, result_code, result_description, recover_flag, recon_flag, negative_flag, negative_exchange_type, request_identify, request_biz_no, pay_unique_no, pay_channel_api, inst_channel_api, clear_channel, biz_identity, gmt_submit, gmt_resp, gmt_settle, gmt_create, gmt_modified from fin_influx_transaction where influx_id = '0001'; select influx_id, org_influx_id, inst_id, business_code, sub_business_code, exchange_type, finance_exchange_code, settle_serial_no, payer_account_no, exchange_amount, exchange_currency, account_amount, account_currency, settle_amount, settle_currency, settle_status, exchange_status, result_code, result_description, recover_flag, recon_flag, negative_flag, negative_exchange_type, request_identify, request_biz_no, pay_unique_no, pay_channel_api, inst_channel_api, clear_channel, biz_identity, gmt_submit, gmt_resp, gmt_settle, gmt_create, gmt_modified from fin_influx_transaction where influx_id = '0001';
select influx_id, org_influx_id, inst_id, business_code, sub_business_code, exchange_type, finance_exchange_code, settle_serial_no, payer_account_no, exchange_amount, exchange_currency, account_amount, account_currency, settle_amount, settle_currency, settle_status, exchange_status, result_code, result_description, recover_flag, recon_flag, negative_flag, negative_exchange_type, request_identify, request_biz_no, pay_unique_no, pay_channel_api, inst_channel_api, clear_channel, biz_identity, gmt_submit, gmt_resp, gmt_settle, gmt_create, gmt_modified from fin_influx_transaction where finance_exchange_code = 'ss' and settle_serial_no = '00001'; select influx_id, org_influx_id, inst_id, business_code, sub_business_code, exchange_type, finance_exchange_code, settle_serial_no, payer_account_no, exchange_amount, exchange_currency, account_amount, account_currency, settle_amount, settle_currency, settle_status, exchange_status, result_code, result_description, recover_flag, recon_flag, negative_flag, negative_exchange_type, request_identify, request_biz_no, pay_unique_no, pay_channel_api, inst_channel_api, clear_channel, biz_identity, gmt_submit, gmt_resp, gmt_settle, gmt_create, gmt_modified from fin_influx_transaction where finance_exchange_code = 'ss' and settle_serial_no = '00001';
select influx_id, org_influx_id, inst_id, business_code, sub_business_code, exchange_type, finance_exchange_code, settle_serial_no, payer_account_no, exchange_amount, exchange_currency, account_amount, account_currency, settle_amount, settle_currency, settle_status, exchange_status, result_code, result_description, recover_flag, recon_flag, negative_flag, negative_exchange_type, request_identify, request_biz_no, pay_unique_no, pay_channel_api, inst_channel_api, clear_channel, biz_identity, gmt_submit, gmt_resp, gmt_settle, gmt_create, gmt_modified from fin_influx_transaction where inst_channel_api = 'api' and settle_serial_no = '00001'; select influx_id, org_influx_id, inst_id, business_code, sub_business_code, exchange_type, finance_exchange_code, settle_serial_no, payer_account_no, exchange_amount, exchange_currency, account_amount, account_currency, settle_amount, settle_currency, settle_status, exchange_status, result_code, result_description, recover_flag, recon_flag, negative_flag, negative_exchange_type, request_identify, request_biz_no, pay_unique_no, pay_channel_api, inst_channel_api, clear_channel, biz_identity, gmt_submit, gmt_resp, gmt_settle, gmt_create, gmt_modified from fin_influx_transaction where inst_channel_api = 'api' and settle_serial_no = '00001';
### table 10 idx1_fin_influx_transaction ### table 10 idx1_fin_influx_transaction
@ -182,9 +182,9 @@ gmt_modified datetime,
primary key(inst_account_no, gmt_create, influx_id) primary key(inst_account_no, gmt_create, influx_id)
); );
select influx_id, payer_account_no, payer_name, inst_account_no, inst_account_name, card_type, card_index, issuer, agreement_no, certificate_type, certificate_no, mobile_phone, pay_tool, bill_no, bill_type, gmt_create, gmt_modified from fin_influx_payer where influx_id='0001'; select influx_id, payer_account_no, payer_name, inst_account_no, inst_account_name, card_type, card_index, issuer, agreement_no, certificate_type, certificate_no, mobile_phone, pay_tool, bill_no, bill_type, gmt_create, gmt_modified from fin_influx_payer where influx_id='0001';
select influx_id, payer_account_no, payer_name, inst_account_no, inst_account_name, card_type, card_index, issuer, agreement_no, certificate_type, certificate_no, mobile_phone, pay_tool, bill_no, bill_type, gmt_create, gmt_modified from fin_influx_payer where bill_no='sss'; select influx_id, payer_account_no, payer_name, inst_account_no, inst_account_name, card_type, card_index, issuer, agreement_no, certificate_type, certificate_no, mobile_phone, pay_tool, bill_no, bill_type, gmt_create, gmt_modified from fin_influx_payer where bill_no='sss';
select influx_id, payer_account_no, payer_name, inst_account_no, inst_account_name, card_type, card_index, issuer, agreement_no, certificate_type, certificate_no, mobile_phone, pay_tool, bill_no, bill_type, gmt_create, gmt_modified from fin_influx_payer where inst_account_no='0001' and gmt_create>='2012-10-1 23:00:00' and gmt_create<='2012-12-23 23:00:00'; select influx_id, payer_account_no, payer_name, inst_account_no, inst_account_name, card_type, card_index, issuer, agreement_no, certificate_type, certificate_no, mobile_phone, pay_tool, bill_no, bill_type, gmt_create, gmt_modified from fin_influx_payer where inst_account_no='0001' and gmt_create>='2012-10-1 23:00:00' and gmt_create<='2012-12-23 23:00:00';
## table 12 idx1_fin_influx_payer ## table 12 idx1_fin_influx_payer

View File

@ -17,13 +17,13 @@ drop table if exists t1,t2,t3,t4,t5;
## Bug #10966: Variance functions return wrong data type ## Bug #10966: Variance functions return wrong data type
## ##
# #
#create table t1 select variance(0); #create table t1 select variance(0);
#show create table t1; #show create table t1;
#drop table t1; #drop table t1;
#create table t1 select stddev(0); #create table t1 select stddev(0);
#show create table t1; #show create table t1;
#drop table t1; #drop table t1;
# #
# #
## ##
## Bug#22555: STDDEV yields positive result for groups with only one row ## Bug#22555: STDDEV yields positive result for groups with only one row
@ -127,7 +127,7 @@ drop table t1;
# #
## ##
## Bug #23184: SELECT causes server crash ## Bug #23184: SELECT causes server crash
## ##
CREATE TABLE t1 (a INT, b INT primary key); CREATE TABLE t1 (a INT, b INT primary key);
INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8); INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8);
#INSERT INTO t1 SELECT a, b+8 FROM t1; #INSERT INTO t1 SELECT a, b+8 FROM t1;
@ -150,7 +150,7 @@ SELECT a,AVG(DISTINCT b) AS average FROM t1 GROUP BY a HAVING average > 50;
DROP TABLE t1; DROP TABLE t1;
# #
## ##
## Bug #27573: MIN() on an indexed column which is always NULL sets _other_ ## Bug #27573: MIN() on an indexed column which is always NULL sets _other_
## results to NULL ## results to NULL
## ##
CREATE TABLE t1 ( a INT, b INT primary key); CREATE TABLE t1 ( a INT, b INT primary key);
@ -186,7 +186,7 @@ EXPLAIN SELECT MIN(a), MIN(b) FROM t4 where a = 2;
SELECT MIN(a), MIN(b) FROM t4 where a = 2; SELECT MIN(a), MIN(b) FROM t4 where a = 2;
SELECT MIN(b), min(c) FROM t4 where a = 2; SELECT MIN(b), min(c) FROM t4 where a = 2;
# #
CREATE TABLE t5( a INT, b INT, primary KEY( a, b),c int); CREATE TABLE t5( a INT, b INT, primary KEY( a, b),c int);
INSERT INTO t5(a,b) VALUES( 1, 1 ), ( 1, 2 ); INSERT INTO t5(a,b) VALUES( 1, 1 ), ( 1, 2 );
--replace_regex /Plan signature: [0-9]*/Plan signature/ --replace_regex /Plan signature: [0-9]*/Plan signature/
--disable_result_log --disable_result_log
@ -201,13 +201,13 @@ DROP TABLE t1, t2, t3, t4, t5;
#drop table t4, t5; #drop table t4, t5;
# #
## ##
## Bug #31156: mysqld: item_sum.cc:918: ## Bug #31156: mysqld: item_sum.cc:918:
## virtual bool Item_sum_distinct::setup(THD*): Assertion ## virtual bool Item_sum_distinct::setup(THD*): Assertion
## ##
# #
#CREATE TABLE t1 (a INT); #CREATE TABLE t1 (a INT);
#INSERT INTO t1 values (),(),(); #INSERT INTO t1 values (),(),();
#SELECT (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) ) as x FROM t1 #SELECT (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) ) as x FROM t1
# GROUP BY x; # GROUP BY x;
#SELECT 1 FROM t1 GROUP BY (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) ); #SELECT 1 FROM t1 GROUP BY (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) );
# #
@ -287,10 +287,10 @@ SELECT COUNT(*),a FROM t1;
SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.a= b.a; SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.a= b.a;
# #
#--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS #--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS
#SELECT COUNT(*), (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a) #SELECT COUNT(*), (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a)
#FROM t1 outr; #FROM t1 outr;
# #
#SELECT COUNT(*) FROM t1 a JOIN t1 outr #SELECT COUNT(*) FROM t1 a JOIN t1 outr
# ON a.a= (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a); # ON a.a= (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a);
# #
#SET SQL_MODE=default; #SET SQL_MODE=default;
@ -301,13 +301,13 @@ DROP TABLE t1;
#--echo End of 5.0 tests #--echo End of 5.0 tests
# #
#--echo # #--echo #
#--echo # BUG#47280 - strange results from count(*) with order by multiple #--echo # BUG#47280 - strange results from count(*) with order by multiple
#--echo # columns without where/group #--echo # columns without where/group
#--echo # #--echo #
# #
#--echo # #--echo #
#--echo # Initialize test #--echo # Initialize test
#--echo # #--echo #
# #
CREATE TABLE t1 ( CREATE TABLE t1 (
pk INT NOT NULL, pk INT NOT NULL,
@ -322,7 +322,7 @@ INSERT INTO t1 VALUES (1,11),(2,12),(3,13);
#--echo # #--echo #
# #
#--echo #--echo
#--echo # Masking all correct values {11...13} for column i in this result. #--echo # Masking all correct values {11...13} for column i in this result.
#--replace_column 2 # #--replace_column 2 #
SELECT MAX(pk) as max, i SELECT MAX(pk) as max, i
FROM t1 FROM t1
@ -386,7 +386,7 @@ DROP TABLE t1;
#CREATE TABLE t1 (a INT); #CREATE TABLE t1 (a INT);
#INSERT INTO t1 VALUES (1), (2); #INSERT INTO t1 VALUES (1), (2);
# #
#SELECT MAX((SELECT 1 FROM t1 ORDER BY @var LIMIT 1)) m FROM t1 t2, t1 #SELECT MAX((SELECT 1 FROM t1 ORDER BY @var LIMIT 1)) m FROM t1 t2, t1
# ORDER BY t1.a; # ORDER BY t1.a;
# #
#DROP TABLE t1; #DROP TABLE t1;
@ -414,7 +414,7 @@ DROP TABLE t1;
# #
# #
#--echo # #--echo #
#--echo # Bug #11766094 - 59132: MIN() AND MAX() REMOVE UNSIGNEDNESS #--echo # Bug #11766094 - 59132: MIN() AND MAX() REMOVE UNSIGNEDNESS
#--echo # #--echo #
# #
#CREATE TABLE t1 (a BIGINT UNSIGNED); #CREATE TABLE t1 (a BIGINT UNSIGNED);

View File

@ -28,7 +28,7 @@ create table dddddddddd2222222222333333333344444444445555555555666666666612345 (
drop table if exists alter_table1; drop table if exists alter_table1;
--enable_warnings --enable_warnings
create table alter_table1 (cc1 int primary key); create table alter_table1 (cc1 int primary key);
ALTER TABLE alter_table1 CHANGE cc1 `hhhhhhhhhh222222222233333333334444444444555555555566666666661234` INT; ALTER TABLE alter_table1 CHANGE cc1 `hhhhhhhhhh222222222233333333334444444444555555555566666666661234` INT;
--disable_warnings --disable_warnings
@ -39,7 +39,7 @@ drop table if exists alter_table1;
drop table if exists alter_table2; drop table if exists alter_table2;
--enable_warnings --enable_warnings
create table alter_table2 (cc2 int primary key); create table alter_table2 (cc2 int primary key);
#--error 1059 #--error 1059
ALTER TABLE alter_table2 CHANGE cc2 `gggggggggg2222222222333333333344444444445555555555666666666612345` INT; ALTER TABLE alter_table2 CHANGE cc2 `gggggggggg2222222222333333333344444444445555555555666666666612345` INT;
@ -64,11 +64,11 @@ use vvvvvvvvvv2222222222333333333344444444445555555555666666666612345vvvvvvvvvv2
drop database vvvvvvvvvv2222222222333333333344444444445555555555666666666612345vvvvvvvvvv2222222222333333333344444444445555555555666666666612345vvvvvvvvvv2222222222333333333344444444445555555555666666666a193; drop database vvvvvvvvvv2222222222333333333344444444445555555555666666666612345vvvvvvvvvv2222222222333333333344444444445555555555666666666612345vvvvvvvvvv2222222222333333333344444444445555555555666666666a193;
##name can not ended with ' ' ##name can not ended with ' '
--error 1102 --error 1102
create database `adc `; create database `adc `;
--error 1102 --error 1102
drop database `adc `; drop database `adc `;
--error 1102 --error 1102
use `adc `; use `adc `;
##when bytes number of name is between 65 and 191,return error 1102 ##when bytes number of name is between 65 and 191,return error 1102
@ -78,30 +78,30 @@ drop database vvvvvvvvvv2222222222333333333344444444445555555555666666666612a65;
use vvvvvvvvvv2222222222333333333344444444445555555555666666666612a65; use vvvvvvvvvv2222222222333333333344444444445555555555666666666612a65;
#when database name is prefix of '#mysql50#' and end of these alpha '~' ,'.', '\\' ,'/' return error 1102 #when database name is prefix of '#mysql50#' and end of these alpha '~' ,'.', '\\' ,'/' return error 1102
--error 1102 --error 1102
create database `#mysql50#~`; create database `#mysql50#~`;
--error 1102 --error 1102
drop database `#mysql50#~`; drop database `#mysql50#~`;
--error 1102 --error 1102
use `#mysql50#~`; use `#mysql50#~`;
--error 1102 --error 1102
create database `#mysql50#.`; create database `#mysql50#.`;
--error 1102 --error 1102
drop database `#mysql50#.`; drop database `#mysql50#.`;
--error 1102 --error 1102
use `#mysql50#.`; use `#mysql50#.`;
--error 1102 --error 1102
create database `#mysql50#\\`; create database `#mysql50#\\`;
--error 1102 --error 1102
drop database `#mysql50#\\`; drop database `#mysql50#\\`;
--error 1102 --error 1102
use `#mysql50#\\`; use `#mysql50#\\`;
--error 1102 --error 1102
create database `#mysql50#/`; create database `#mysql50#/`;
--error 1102 --error 1102
drop database `#mysql50#/`; drop database `#mysql50#/`;
--error 1102 --error 1102
use `#mysql50#/`; use `#mysql50#/`;

View File

@ -29,3 +29,5 @@ create unique index idx_5 on tbl1(d4);
create unique index idx_7 on tbl1(i1,v2,i3,d4,i6); create unique index idx_7 on tbl1(i1,v2,i3,d4,i6);
#--source mysql_test/include/check_idx_error.inc #--source mysql_test/include/check_idx_error.inc
drop table tbl1; drop table tbl1;

View File

@ -5,10 +5,10 @@ set @@session.explicit_defaults_for_timestamp=off;
#owner group: sql1 #owner group: sql1
#test: #test:
#create index objecting to columns #create index objecting to columns
###TODO regenerate result file after physicalplan output is ready ###TODO regenerate result file after physicalplan output is ready
--disable_query_log --disable_query_log
--source mysql_test/include/index_quick_major.inc --source mysql_test/include/index_quick_major.inc
--real_sleep 1 --real_sleep 1
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;

View File

@ -85,3 +85,5 @@ select pk1 from t1 where key2=NULL and key3<=NULL;
## ##
select * from t1 where key2=NULL and key3>=NULL; select * from t1 where key2=NULL and key3>=NULL;
select pk1 from t1 where key2=NULL and key3>=NULL; select pk1 from t1 where key2=NULL and key3>=NULL;

View File

@ -28,3 +28,5 @@ select /*+index(t1 i1) */ * from t1 b where b.c2 > 0 and b.c2 < 5;
select /*+index(b i1) */ * from t1 b where b.c2 > 0 and b.c2 < 5; select /*+index(b i1) */ * from t1 b where b.c2 > 0 and b.c2 < 5;
drop table t1; drop table t1;

View File

@ -34,7 +34,7 @@ select * from t1 intersect all (select * from t2 where false);
(select * from t1 where false) intersect all (select * from t2 where false) intersect (select * from t3 where false); (select * from t1 where false) intersect all (select * from t2 where false) intersect (select * from t3 where false);
# #
select c1 from t1 intersect select c1 from t1; select c1 from t1 intersect select c1 from t1;
--error 1064 --error 1064
select c1 from t1 intersect all select c1 from t1; select c1 from t1 intersect all select c1 from t1;
@ -102,3 +102,5 @@ insert into t8 values('cdxLVdvvJjcoHFBECqXKkRGoMXYgNsTpJRrqYaluQdfEeB00000',0,'R
explain ((select c6 from t8 where c6 < 1000) except (select c6 from t8 where c6 > -1000) order by c6 limit 1000) union all (select t8_alias1.c10 from t8 t8_alias1 limit 1); explain ((select c6 from t8 where c6 < 1000) except (select c6 from t8 where c6 > -1000) order by c6 limit 1000) union all (select t8_alias1.c10 from t8 t8_alias1 limit 1);
drop table t1,t2,t3,t4,t5,t6, t8; drop table t1,t2,t3,t4,t5,t6, t8;

View File

@ -66,3 +66,4 @@ select * from t2;
select * from t1, t2 where t1.c1>=t2.c1; select * from t1, t2 where t1.c1>=t2.c1;
drop table orders,persons, t1, t2, t3; drop table orders,persons, t1, t2, t3;

View File

@ -72,3 +72,5 @@ select t1.pk,t2.c2 from t1 RIGHT join t2 on t1.pk=t2.pk and t2.pk=1;
--sorted_result --sorted_result
select t1.pk,t2.c2 from t1 FULL join t2 on t1.pk=t2.pk and t2.pk=1; select t1.pk,t2.c2 from t1 FULL join t2 on t1.pk=t2.pk and t2.pk=1;

View File

@ -27,18 +27,18 @@ insert into tbl4 values(1,'now','haha',1.6256,'2014-05-04 12:00:00',3.45);
insert into tbl4 values(2,'now1','haha',1.6256,'2014-05-04 12:00:00',-0.25); insert into tbl4 values(2,'now1','haha',1.6256,'2014-05-04 12:00:00',-0.25);
insert into tbl4 values(3,'now2','haha',1.6256,'2014-05-04 12:00:00',0.253); insert into tbl4 values(3,'now2','haha',1.6256,'2014-05-04 12:00:00',0.253);
insert into tbl4 values(4,'now3','haha',1.6256,'2014-05-04 12:00:00',1.677); insert into tbl4 values(4,'now3','haha',1.6256,'2014-05-04 12:00:00',1.677);
select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl1.i1=tbl3.i1 join tbl4 on tbl1.i1=tbl4.i1; select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl1.i1=tbl3.i1 join tbl4 on tbl1.i1=tbl4.i1;
select * from tbl1 a join tbl2 b on a.i1=b.i1 join tbl3 c on a.i1=c.i1 join tbl4 d on a.i1=d.i1; select * from tbl1 a join tbl2 b on a.i1=b.i1 join tbl3 c on a.i1=c.i1 join tbl4 d on a.i1=d.i1;
select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl1.i1=tbl3.i1 join tbl4 on tbl1.i1=tbl4.i1 where tbl1.i1=1; select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl1.i1=tbl3.i1 join tbl4 on tbl1.i1=tbl4.i1 where tbl1.i1=1;
select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl2.i1=tbl3.i1 join tbl4 on tbl3.i1=tbl4.i1; select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl2.i1=tbl3.i1 join tbl4 on tbl3.i1=tbl4.i1;
select * from tbl1 a join tbl2 b on a.i1=b.i1 join tbl3 c on b.i1=c.i1 join tbl4 d on c.i1=d.i1; select * from tbl1 a join tbl2 b on a.i1=b.i1 join tbl3 c on b.i1=c.i1 join tbl4 d on c.i1=d.i1;
--replace_regex /Plan signature: [0-9]*/Plan signature/ --replace_regex /Plan signature: [0-9]*/Plan signature/
--disable_result_log --disable_result_log
explain select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl1.i1=tbl3.i1 join tbl4 on tbl1.i1=tbl4.i1; explain select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl1.i1=tbl3.i1 join tbl4 on tbl1.i1=tbl4.i1;
--enable_result_log --enable_result_log
--replace_regex /Plan signature: [0-9]*/Plan signature/ --replace_regex /Plan signature: [0-9]*/Plan signature/
--disable_result_log --disable_result_log
explain select * from tbl1 a join tbl2 b on a.i1=b.i1 join tbl3 c on a.i1=c.i1 join tbl4 d on a.i1=d.i1; explain select * from tbl1 a join tbl2 b on a.i1=b.i1 join tbl3 c on a.i1=c.i1 join tbl4 d on a.i1=d.i1;
--enable_result_log --enable_result_log
--replace_regex /Plan signature: [0-9]*/Plan signature/ --replace_regex /Plan signature: [0-9]*/Plan signature/
--disable_result_log --disable_result_log
@ -48,18 +48,18 @@ explain select * from tbl1 join tbl2 on tbl1.i1=tbl2.i1 join tbl3 on tbl2.i1=t
--disable_result_log --disable_result_log
explain select * from tbl1 a join tbl2 b on a.i1=b.i1 join tbl3 c on b.i1=c.i1 join tbl4 d on c.i1=d.i1; explain select * from tbl1 a join tbl2 b on a.i1=b.i1 join tbl3 c on b.i1=c.i1 join tbl4 d on c.i1=d.i1;
--enable_result_log --enable_result_log
select * from tbl1 left join tbl2 on tbl1.i1=tbl2.i1 left join tbl3 on tbl1.i1=tbl3.i1 left join tbl4 on tbl1.i1=tbl4.i1; select * from tbl1 left join tbl2 on tbl1.i1=tbl2.i1 left join tbl3 on tbl1.i1=tbl3.i1 left join tbl4 on tbl1.i1=tbl4.i1;
select * from tbl1 a left join tbl2 b on a.i1=b.i1 left join tbl3 c on a.i1=c.i1 left join tbl4 d on a.i1=d.i1; select * from tbl1 a left join tbl2 b on a.i1=b.i1 left join tbl3 c on a.i1=c.i1 left join tbl4 d on a.i1=d.i1;
select * from tbl1 left join tbl2 on tbl1.i1=tbl2.i1 left join tbl3 on tbl1.i1=tbl3.i1 left join tbl4 on tbl1.i1=tbl4.i1 where tbl1.i1=1; select * from tbl1 left join tbl2 on tbl1.i1=tbl2.i1 left join tbl3 on tbl1.i1=tbl3.i1 left join tbl4 on tbl1.i1=tbl4.i1 where tbl1.i1=1;
select * from tbl1 left join tbl2 on tbl1.i1=tbl2.i1 left join tbl3 on tbl2.i1=tbl3.i1 left join tbl4 on tbl3.i1=tbl4.i1; select * from tbl1 left join tbl2 on tbl1.i1=tbl2.i1 left join tbl3 on tbl2.i1=tbl3.i1 left join tbl4 on tbl3.i1=tbl4.i1;
select * from tbl1 a left join tbl2 b on a.i1=b.i1 left join tbl3 c on b.i1=c.i1 left join tbl4 d on c.i1=d.i1; select * from tbl1 a left join tbl2 b on a.i1=b.i1 left join tbl3 c on b.i1=c.i1 left join tbl4 d on c.i1=d.i1;
--replace_regex /Plan signature: [0-9]*/Plan signature/ --replace_regex /Plan signature: [0-9]*/Plan signature/
--disable_result_log --disable_result_log
explain select* from tbl1 left join tbl2 on tbl1.i1=tbl2.i1 left join tbl3 on tbl1.i1=tbl3.i1 left join tbl4 on tbl1.i1=tbl4.i1; explain select* from tbl1 left join tbl2 on tbl1.i1=tbl2.i1 left join tbl3 on tbl1.i1=tbl3.i1 left join tbl4 on tbl1.i1=tbl4.i1;
--enable_result_log --enable_result_log
--replace_regex /Plan signature: [0-9]*/Plan signature/ --replace_regex /Plan signature: [0-9]*/Plan signature/
--disable_result_log --disable_result_log
explain select* from tbl1 a left join tbl2 b on a.i1=b.i1 left join tbl3 c on a.i1=c.i1 left join tbl4 d on a.i1=d.i1; explain select* from tbl1 a left join tbl2 b on a.i1=b.i1 left join tbl3 c on a.i1=c.i1 left join tbl4 d on a.i1=d.i1;
--enable_result_log --enable_result_log
--replace_regex /Plan signature: [0-9]*/Plan signature/ --replace_regex /Plan signature: [0-9]*/Plan signature/
--disable_result_log --disable_result_log

View File

@ -34,3 +34,4 @@ SELECT * FROM (SELECT * FROM tjuo1) tjuo1_alias RIGHT JOIN tjuo2 USING (c1) RI
SELECT * FROM (SELECT c2 FROM tjuo1 as i1 JOIN (SELECT * FROM tjuo2) as i2 USING (c1) ) as t12 RIGHT JOIN (SELECT * FROM tjuo3) as tjuo3_alias USING (c2); SELECT * FROM (SELECT c2 FROM tjuo1 as i1 JOIN (SELECT * FROM tjuo2) as i2 USING (c1) ) as t12 RIGHT JOIN (SELECT * FROM tjuo3) as tjuo3_alias USING (c2);
SELECT * FROM (SELECT c2 FROM tjuo1 as i1 JOIN (SELECT * FROM tjuo2) as i2 USING (c1) ) as t12; SELECT * FROM (SELECT c2 FROM tjuo1 as i1 JOIN (SELECT * FROM tjuo2) as i2 USING (c1) ) as t12;
drop table tjuo1, tjuo2, tjuo3; drop table tjuo1, tjuo2, tjuo3;

View File

@ -38,3 +38,4 @@ select * FROM t1 ORDER BY a desc LIMIT 8;
select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
drop table t1; drop table t1;

View File

@ -17,3 +17,5 @@ insert into t1 values(1,1);
rollback; rollback;
insert into t1 values(1,1); insert into t1 values(1,1);
rollback; rollback;

View File

@ -27,3 +27,4 @@ select use_bloom_filter() from dual;
select use_bloom() from dual; select use_bloom() from dual;
drop table t_status; drop table t_status;

View File

@ -5,7 +5,7 @@ set @@session.explicit_defaults_for_timestamp=off;
#owner group: sql1 #owner group: sql1
# #
## Bug ## Bug
# #
# partition by key() # partition by key()
--disable_warnings --disable_warnings

View File

@ -5,5 +5,5 @@ set @@session.explicit_defaults_for_timestamp=off;
# owner group: SQL2 # owner group: SQL2
# description: # description:
# #
--error 1064 --error 1064
SELECT name FROM master.dbo.sysdatabases WHERE status <> 512; SELECT name FROM master.dbo.sysdatabases WHERE status <> 512;

View File

@ -41,3 +41,7 @@ commit;
select * from t1; select * from t1;

View File

@ -142,3 +142,4 @@ commit;
select * from tbl1 where pk in (100,200); select * from tbl1 where pk in (100,200);
delete from tbl1 where pk in (100,200); delete from tbl1 where pk in (100,200);

View File

@ -5,7 +5,7 @@ set @@session.explicit_defaults_for_timestamp=off;
#owner: linlin.xll #owner: linlin.xll
#owner group: SQL1 #owner group: SQL1
#description: #description:
#tags:sys_vars #tags:sys_vars
connect (conn1,$OBMYSQL_MS0,$OBMYSQL_USR,$OBMYSQL_PWD,test,$OBMYSQL_PORT); connect (conn1,$OBMYSQL_MS0,$OBMYSQL_USR,$OBMYSQL_PWD,test,$OBMYSQL_PORT);
connection conn1; connection conn1;

View File

@ -5,7 +5,7 @@ set @@session.explicit_defaults_for_timestamp=off;
#owner: linlin.xll #owner: linlin.xll
#owner group: SQL1 #owner group: SQL1
#description: #description:
#tags: sys_vars #tags: sys_vars
show collation; show collation;
show collation; show collation;

View File

@ -16,7 +16,7 @@ insert into tc1 values (3, 'ccccc');
create index idxc2 on tc1(c2); create index idxc2 on tc1(c2);
alter table tc1 add index idxc3(c1,c2); alter table tc1 add index idxc3(c1,c2);
select * from tc1; select * from tc1;
--source mysql_test/include/check_all_idx_ok.inc --source mysql_test/include/check_all_idx_ok.inc
show index from tc1; show index from tc1;
truncate table tc1; truncate table tc1;
let $is_truncate_table = 1; let $is_truncate_table = 1;

View File

@ -103,3 +103,7 @@ if($user2_c_2 == $user2_ct)
} }
drop table t1; drop table t1;

View File

@ -109,4 +109,4 @@ select * from t1;
#connection conn1; #connection conn1;
#--error 4012 #--error 4012
#commit; #commit;
set global ob_trx_timeout = 100000000; set global ob_trx_timeout = 100000000;

View File

@ -8,15 +8,16 @@ set @@session.explicit_defaults_for_timestamp=off;
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
create table t1(pk int primary key, i1 int, v1 varchar(20)); create table t1(pk int primary key, i1 int, v1 varchar(20));
set autocommit=0; set autocommit=0;
set session ob_trx_timeout=10000000; set session ob_trx_timeout=10000000;
#because start from 4.0 empty delete won't cause session into txn, #because start from 4.0 empty delete won't cause session into txn,
#we do some really modifies here #we do some really modifies here
--disable_query_log --disable_query_log
insert into t1 values(1,1,'1'); insert into t1 values(1,1,'1');
--enable_query_log --enable_query_log
delete from t1 where pk<4; delete from t1 where pk<4;
sleep 12; sleep 12;
--error 6002 --error 6002
commit; commit;

View File

@ -50,16 +50,16 @@ insert into t2 values
--enable_query_log --enable_query_log
##############one table union ############# ##############one table union #############
#all use index #all use index
--sorted_result --sorted_result
(select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) union all (select /*+index(t1 i1) */ pk1,c1 from t1 where c1 > 10 order by c1); (select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) union all (select /*+index(t1 i1) */ pk1,c1 from t1 where c1 > 10 order by c1);
select * from ((select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) union all (select /*+index(t1 i1) */ pk1,c1 from t2 where c1 > 10 order by c1) ) a order by pk1, a.c1; select * from ((select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) union all (select /*+index(t1 i1) */ pk1,c1 from t2 where c1 > 10 order by c1) ) a order by pk1, a.c1;
--sorted_result --sorted_result
(select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) union (select /*+index(t1 i1) */ pk1,c1 from t1 where c1 > 10 order by c1); (select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) union (select /*+index(t1 i1) */ pk1,c1 from t1 where c1 > 10 order by c1);
--sorted_result --sorted_result
(select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) except (select /*+index(t1 i1) */ pk1,c1 from t1 where c1 > 10 order by c1); (select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) except (select /*+index(t1 i1) */ pk1,c1 from t1 where c1 > 10 order by c1);
--sorted_result --sorted_result
(select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) intersect (select /*+index(t1 i1) */ pk1,c1 from t1 where c1 > 10 order by c1); (select /*+index(t1 i1) */ pk1,c1 from t1 where c1<30 order by c1) intersect (select /*+index(t1 i1) */ pk1,c1 from t1 where c1 > 10 order by c1);
--sorted_result --sorted_result
(select c1,c2,c3 from t1 where c1=11 order by c2) union (select c1,c2,c3 from t1 where c1=22 and c2 like 'column3_' order by c1) union distinct select c1,c2,c3 from t1 where c1>22 and c2 is not null and c3>='2013-12-11 11:11:11' union all (select c1,c2,c3 from t1 where c4<2 and c5>1 and c6=3 order by c4) except (select c1,c2,c3 from t1 where c3 <= '2013-12-11 11:11:11' order by c3); (select c1,c2,c3 from t1 where c1=11 order by c2) union (select c1,c2,c3 from t1 where c1=22 and c2 like 'column3_' order by c1) union distinct select c1,c2,c3 from t1 where c1>22 and c2 is not null and c3>='2013-12-11 11:11:11' union all (select c1,c2,c3 from t1 where c4<2 and c5>1 and c6=3 order by c4) except (select c1,c2,c3 from t1 where c3 <= '2013-12-11 11:11:11' order by c3);

View File

@ -54,3 +54,4 @@ select * from test;
set @@global.ob_enable_plan_cache= 1; set @@global.ob_enable_plan_cache= 1;
drop table test; drop table test;
drop database db1; drop database db1;

View File

@ -23,7 +23,7 @@ insert into tbl1 values(1,1,'abc12','1agc',1.25,'2014-01-01 12:00:00',23.23,1),
(11,null,null,null,null,null,null,null); (11,null,null,null,null,null,null,null);
create unique index idx_1 on tbl1(i1); create unique index idx_1 on tbl1(i1);
--source mysql_test/include/check_all_idx_ok.inc --source mysql_test/include/check_all_idx_ok.inc
select date_sub(null, INTERVAL -6 DAY); select date_sub(null, INTERVAL -6 DAY);
select * from tbl1; select * from tbl1;
update tbl1 set i1=i1-20 where pk<=11 limit 20; update tbl1 set i1=i1-20 where pk<=11 limit 20;
update tbl1 set i1=i1+20 where pk<=11 limit 20; update tbl1 set i1=i1+20 where pk<=11 limit 20;
@ -47,8 +47,8 @@ update tbl1 set i5=i5-0.05;
update tbl1 set i6=i6 and 1; update tbl1 set i6=i6 and 1;
select * from tbl1; select * from tbl1;
select * from tbl1 where i1>10 and i1<=1000; select * from tbl1 where i1>10 and i1<=1000;
select * from tbl1 where i1>10+1 and i1<1000; select * from tbl1 where i1>10+1 and i1<1000;
select * from tbl1 where i1 between 10+1 and 1000; select * from tbl1 where i1 between 10+1 and 1000;
prepare stmt1 from select * from tbl1 where i1>?+1 and i1<?-10; prepare stmt1 from select * from tbl1 where i1>?+1 and i1<?-10;
set @a=10; set @a=10;
set @b=1000; set @b=1000;
@ -56,16 +56,16 @@ execute stmt1 using @a, @b;
set @a=10+1-1; set @a=10+1-1;
set @b=1000-1+1; set @b=1000-1+1;
execute stmt1 using @a, @b; execute stmt1 using @a, @b;
select * from tbl1 where i1>10 and i1<1000-10; select * from tbl1 where i1>10 and i1<1000-10;
select * from tbl1 where i1>10+1 and i1<1000-10; select * from tbl1 where i1>10+1 and i1<1000-10;
select * from tbl1 where i1>1*10+1 and i1<1000; select * from tbl1 where i1>1*10+1 and i1<1000;
select * from tbl1 where i1>10 and i1<=1000*2; select * from tbl1 where i1>10 and i1<=1000*2;
select * from tbl1 where i1>10*2+3 and i1<=1000*2; select * from tbl1 where i1>10*2+3 and i1<=1000*2;
select * from tbl1 where i1>1*50/5+1 and i1<=1000*2/2+1; select * from tbl1 where i1>1*50/5+1 and i1<=1000*2/2+1;
select * from tbl1 where i1>50 and i1<=1000*2/2+1; select * from tbl1 where i1>50 and i1<=1000*2/2+1;
select * from tbl1 where i1>50*1+3 and i1<=1000; select * from tbl1 where i1>50*1+3 and i1<=1000;
select * from tbl1 where i1>(19 mod 10)+1 and i1<=1000; select * from tbl1 where i1>(19 mod 10)+1 and i1<=1000;
select * from tbl1 where i1>(19 mod 10)+1 and i1<=(1000 mod 1001) +10; select * from tbl1 where i1>(19 mod 10)+1 and i1<=(1000 mod 1001) +10;
prepare stmt1 from select * from tbl1 where i1>(? mod 10) and i1<(? mod 1005)-10; prepare stmt1 from select * from tbl1 where i1>(? mod 10) and i1<(? mod 1005)-10;
set @a=10; set @a=10;
set @b=1001; set @b=1001;
@ -73,33 +73,33 @@ execute stmt1 using @a, @b;
set @a=10+1-1; set @a=10+1-1;
set @b=1001-1+1; set @b=1001-1+1;
execute stmt1 using @a, @b; execute stmt1 using @a, @b;
select * from tbl1 where i1>10 and i1<1000-10; select * from tbl1 where i1>10 and i1<1000-10;
select * from tbl1 where i1>10+1 and i1<1000-10; select * from tbl1 where i1>10+1 and i1<1000-10;
select * from tbl1 where i1>1*10+1 and i1<1000; select * from tbl1 where i1>1*10+1 and i1<1000;
select * from tbl1 where i1>10 and i1<=1000*2; select * from tbl1 where i1>10 and i1<=1000*2;
select * from tbl1 where i1>10*2+3 and i1<=1000*2; select * from tbl1 where i1>10*2+3 and i1<=1000*2;
update tbl1 set i1=i1+1-1 where i1>10*2+3 and i1<=1000*2; update tbl1 set i1=i1+1-1 where i1>10*2+3 and i1<=1000*2;
select * from tbl1 where i1>1*50/5+1 and i1<=1000*2/2+1; select * from tbl1 where i1>1*50/5+1 and i1<=1000*2/2+1;
select * from tbl1 where i1>50 and i1<=1000*2/2+1; select * from tbl1 where i1>50 and i1<=1000*2/2+1;
select * from tbl1 where i1>50*1+3 and i1<=1000; select * from tbl1 where i1>50*1+3 and i1<=1000;
select * from tbl1 where i1>(19 mod 10)+1 and i1<=1000; select * from tbl1 where i1>(19 mod 10)+1 and i1<=1000;
select * from tbl1 where i1>(19 mod 10)+1 and i1<=(1000 mod 1001) +10; select * from tbl1 where i1>(19 mod 10)+1 and i1<=(1000 mod 1001) +10;
select * from tbl1 where i1>10 and i1<=(1000 mod 1001) +10; select * from tbl1 where i1>10 and i1<=(1000 mod 1001) +10;
select * from tbl1 where i1>10+0 and i1<=(1000*1001) +10; select * from tbl1 where i1>10+0 and i1<=(1000*1001) +10;
select * from tbl1 where i1>=10+null and i1<=(1000*1001) +10; select * from tbl1 where i1>=10+null and i1<=(1000*1001) +10;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) +null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) +null;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is null;
update tbl1 set i1=i1+1-1 where i1>=10+1 and i1<=(1000*2) or i1 is null; update tbl1 set i1=i1+1-1 where i1>=10+1 and i1<=(1000*2) or i1 is null;
--error 1064 --error 1064
select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is (null+1); select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is (null+1);
--error 5083 --error 5083
select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is null+1; select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is null+1;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is null;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is not null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is not null;
update tbl1 set i1=i1+100-100 where i1>=10+1 and i1<=(1000*2) and i1 is not null; update tbl1 set i1=i1+100-100 where i1>=10+1 and i1<=(1000*2) and i1 is not null;
select * from tbl1 where i1>=10+1 and i1<=(100*2) or i1 = 610; select * from tbl1 where i1>=10+1 and i1<=(100*2) or i1 = 610;
select * from tbl1 where i1>=10+1 and i1<=(100*2) or i3 = 'cx23abc12'; select * from tbl1 where i1>=10+1 and i1<=(100*2) or i3 = 'cx23abc12';
select * from tbl1 where i1>=10+1 and i1<=(100*2) and i5 between 0 and 1000; select * from tbl1 where i1>=10+1 and i1<=(100*2) and i5 between 0 and 1000;
prepare stmt1 from select * from tbl1 where i1>=?+1 and i1<=(?*2) and i5 between ? and ?; prepare stmt1 from select * from tbl1 where i1>=?+1 and i1<=(?*2) and i5 between ? and ?;
set @a=10; set @a=10;
set @b=100; set @b=100;
@ -135,22 +135,22 @@ drop index idx_1 on tbl1;
create index idx_12 on tbl1(i1,i5); create index idx_12 on tbl1(i1,i5);
--source mysql_test/include/check_all_idx_ok.inc --source mysql_test/include/check_all_idx_ok.inc
select * from tbl1 where i1>10 and i1<=1000; select * from tbl1 where i1>10 and i1<=1000;
select * from tbl1 where i1>10+1 and i1<1000; select * from tbl1 where i1>10+1 and i1<1000;
select * from tbl1 where i1>10 and i1<1000-10; select * from tbl1 where i1>10 and i1<1000-10;
select * from tbl1 where i1>10+1 and i1<1000-10; select * from tbl1 where i1>10+1 and i1<1000-10;
select * from tbl1 where i1>1*10+1 and i1<1000; select * from tbl1 where i1>1*10+1 and i1<1000;
select * from tbl1 where i1>10 and i1<=1000*2; select * from tbl1 where i1>10 and i1<=1000*2;
select * from tbl1 where i1>10*2+3 and i1<=1000*2; select * from tbl1 where i1>10*2+3 and i1<=1000*2;
select * from tbl1 where i1>10 and i1<=(1000 mod 1001) +10; select * from tbl1 where i1>10 and i1<=(1000 mod 1001) +10;
select * from tbl1 where i1>10+0 and i1<=(1000*1001) +10; select * from tbl1 where i1>10+0 and i1<=(1000*1001) +10;
select * from tbl1 where i1>=10+null and i1<=(1000*1001) +10; select * from tbl1 where i1>=10+null and i1<=(1000*1001) +10;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) +null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) +null;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is null;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is null;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is not null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is not null;
select * from tbl1 where i1>=10+1 and i1<=(100*2) or i1 = 610; select * from tbl1 where i1>=10+1 and i1<=(100*2) or i1 = 610;
select * from tbl1 where i1>=10+1 and i1<=(100*2) or i3 = 'cx23abc12'; select * from tbl1 where i1>=10+1 and i1<=(100*2) or i3 = 'cx23abc12';
select * from tbl1 where i1>=10+1 and i1<=(100*2) and i5 between 0 and 1000; select * from tbl1 where i1>=10+1 and i1<=(100*2) and i5 between 0 and 1000;
select * from tbl1 where i1>=10+1 and i1<=(100*10) and i5 between -100 and 1000; select * from tbl1 where i1>=10+1 and i1<=(100*10) and i5 between -100 and 1000;
select * from tbl1 where i1<=round(1000.5) and i1>=round(0.5); select * from tbl1 where i1<=round(1000.5) and i1>=round(0.5);
select * from tbl1 where i1>=0 and i1<=EXTRACT(DAY FROM '2014-09-30 12:00:00' )+600; select * from tbl1 where i1>=0 and i1<=EXTRACT(DAY FROM '2014-09-30 12:00:00' )+600;
@ -163,33 +163,33 @@ select * from tbl1 where (i4,i1) in ((1.25,1),(-0.25,10),(-85.85,42),(2.25,80));
create index idx_15 on tbl1(i1,i5); create index idx_15 on tbl1(i1,i5);
--source mysql_test/include/check_all_idx_ok.inc --source mysql_test/include/check_all_idx_ok.inc
select * from tbl1 where i1>10 and i1<=1000; select * from tbl1 where i1>10 and i1<=1000;
select * from tbl1 where i1>10+1 and i1<1000; select * from tbl1 where i1>10+1 and i1<1000;
select * from tbl1 where i1>10 and i1<1000-10; select * from tbl1 where i1>10 and i1<1000-10;
select * from tbl1 where i1>10+1 and i1<1000-10; select * from tbl1 where i1>10+1 and i1<1000-10;
select * from tbl1 where i1>1*10+1 and i1<1000; select * from tbl1 where i1>1*10+1 and i1<1000;
select * from tbl1 where i1>10 and i1<=1000*2; select * from tbl1 where i1>10 and i1<=1000*2;
select * from tbl1 where i1>10*2+3 and i1<=1000*2; select * from tbl1 where i1>10*2+3 and i1<=1000*2;
select * from tbl1 where i1>1*50/5+1 and i1<=1000*2/2+1; select * from tbl1 where i1>1*50/5+1 and i1<=1000*2/2+1;
select * from tbl1 where i1>50 and i1<=1000*2/2+1; select * from tbl1 where i1>50 and i1<=1000*2/2+1;
select * from tbl1 where i1>50*1+3 and i1<=1000; select * from tbl1 where i1>50*1+3 and i1<=1000;
select * from tbl1 where i1>(19 mod 10)+1 and i1<=1000; select * from tbl1 where i1>(19 mod 10)+1 and i1<=1000;
select * from tbl1 where i1>(19 mod 10)+1 and i1<=(1000 mod 1001) +10; select * from tbl1 where i1>(19 mod 10)+1 and i1<=(1000 mod 1001) +10;
select * from tbl1 where i1>10 and i1<=(1000 mod 1001) +10; select * from tbl1 where i1>10 and i1<=(1000 mod 1001) +10;
select * from tbl1 where i1>10+0 and i1<=(1000*1001) +10; select * from tbl1 where i1>10+0 and i1<=(1000*1001) +10;
select * from tbl1 where i1>=10+null and i1<=(1000*1001) +10; select * from tbl1 where i1>=10+null and i1<=(1000*1001) +10;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) +null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) +null;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) or i1 is null;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is null;
select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is not null; select * from tbl1 where i1>=10+1 and i1<=(1000*2) and i1 is not null;
select * from tbl1 where i1>=10+1 and i1<=(100*2) or i1 = 610; select * from tbl1 where i1>=10+1 and i1<=(100*2) or i1 = 610;
select * from tbl1 where i1>=10+1 and i1<=(100*2) or i3 = 'cx23abc12'; select * from tbl1 where i1>=10+1 and i1<=(100*2) or i3 = 'cx23abc12';
select * from tbl1 where i1>=10+1 and i1<=(100*2) and i5 between 0 and 1000; select * from tbl1 where i1>=10+1 and i1<=(100*2) and i5 between 0 and 1000;
select * from tbl1 where i1>=10+1 and i1<=(100*10) and i5 between -100 and 1000; select * from tbl1 where i1>=10+1 and i1<=(100*10) and i5 between -100 and 1000;
select * from tbl1 where i1>10+1 and i1<1000 and pk<=10; select * from tbl1 where i1>10+1 and i1<1000 and pk<=10;
select * from tbl1 where i1>-9999999999+1+0 and i1<10000000000-2+1-1+2-2+3-3+4-4+5-5+6-6+7-7+8-8+9-9+0-0+10-10 and pk<=10; select * from tbl1 where i1>-9999999999+1+0 and i1<10000000000-2+1-1+2-2+3-3+4-4+5-5+6-6+7-7+8-8+9-9+0-0+10-10 and pk<=10;
select * from tbl1 where i1>-9999999999+1+0 and i1<10000000000-2+1-1+2-2+3-3+4-4+5-5+6-6+7-7+8-8+9-9+0-0+10-10 ; select * from tbl1 where i1>-9999999999+1+0 and i1<10000000000-2+1-1+2-2+3-3+4-4+5-5+6-6+7-7+8-8+9-9+0-0+10-10 ;
select * from tbl1 where i1>=10+1 and i1<=(100*10) and i5 between -100 and 1000; select * from tbl1 where i1>=10+1 and i1<=(100*10) and i5 between -100 and 1000;
prepare stmt1 from select * from tbl1 where i1>=?+1 and i1<=(?*10) and i5 between ? and ?; prepare stmt1 from select * from tbl1 where i1>=?+1 and i1<=(?*10) and i5 between ? and ?;
set @a=10; set @a=10;
set @b=100; set @b=100;
set @c=-100; set @c=-100;
@ -209,13 +209,13 @@ select * from tbl1 where (i1,i5) in ((1,23.23),(42,-99.131),(50,93.131),(610,99.
select * from tbl1 where (i5,i1) in ((23.23,1),(-99.131,42),(93.131,50),(99.131,610)); select * from tbl1 where (i5,i1) in ((23.23,1),(-99.131,42),(93.131,50),(99.131,610));
select * from tbl1 where (i1,i5,i4) in ((1,23.23,1.25),(610,99.131,-1.85),(42,-99.131,-85.85)); select * from tbl1 where (i1,i5,i4) in ((1,23.23,1.25),(610,99.131,-1.85),(42,-99.131,-85.85));
select * from tbl1 where (i4,i1,i5) in ((1.25,1,23.23),(-1.85,610,99.131),(-85.85,42,-99.131)); select * from tbl1 where (i4,i1,i5) in ((1.25,1,23.23),(-1.85,610,99.131),(-85.85,42,-99.131));
prepare stmt1 from select * from tbl1 where (i4,i1,i5) in ((1.25,?,23.23),(-1.85,?,99.131),(?,42,?)); prepare stmt1 from select * from tbl1 where (i4,i1,i5) in ((1.25,?,23.23),(-1.85,?,99.131),(?,42,?));
set @a=-99.131; set @a=-99.131;
set @b=610; set @b=610;
set @c=1; set @c=1;
set @d=-85.85; set @d=-85.85;
execute stmt1 using @c,@b,@d,@a; execute stmt1 using @c,@b,@d,@a;
prepare stmt1 from select * from tbl1 where i1>=?*?+?+? and i1<=?*?+?-?; prepare stmt1 from select * from tbl1 where i1>=?*?+?+? and i1<=?*?+?-?;
set @a=-10; set @a=-10;
set @b=2; set @b=2;
set @c=1; set @c=1;

View File

@ -58,7 +58,7 @@ create view view_v1_null_default as select c1,c2 from view_t1_null_default;
#create view view_v1_not_null_default as select * from view_t1_not_null_default; #create view view_v1_not_null_default as select * from view_t1_not_null_default;
create view view_v1_not_null_default as select c1,c2 from view_t1_not_null_default; create view view_v1_not_null_default as select c1,c2 from view_t1_not_null_default;
# #
## Bug ## Bug
# #
create table table_t8(c1 int null,c2 int not null); create table table_t8(c1 int null,c2 int not null);
create view view_v8 as select c1+c2 from table_t8; create view view_v8 as select c1+c2 from table_t8;
@ -208,7 +208,7 @@ drop view if exists v1,v2,v3;
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings
# Bug # Bug
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
--enable_warnings --enable_warnings

View File

@ -121,7 +121,7 @@ select v.c1 from v join t2 using(c1);
--error 1356 --error 1356
select v.c1 from v join t2 using(c2); select v.c1 from v join t2 using(c2);
#column in where #column in where
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2;
drop view if exists v; drop view if exists v;
@ -166,7 +166,7 @@ select c1 from v group by c2;
--error 1356 --error 1356
select c1 from v group by (select c2); select c1 from v group by (select c2);
#column in having #column in having
#drop table if exists t1,t2; #drop table if exists t1,t2;
#drop view if exists v; #drop view if exists v;
#create table t1(c1 int,c2 int); #create table t1(c1 int,c2 int);
@ -186,7 +186,7 @@ drop view if exists v;
--enable_warnings --enable_warnings
create table t1(c1 int,c2 int); create table t1(c1 int,c2 int);
insert into t1 values(1,2),(2,3),(3,4); insert into t1 values(1,2),(2,3),(3,4);
create view v as select c1,c2 from t1 order by c2; create view v as select c1,c2 from t1 order by c2;
alter table t1 drop column c2; alter table t1 drop column c2;
#order by 即使是从select里找到了c2(select中的c2不报错是因为view_stmt),因为select里面的c2也是无效列,因此最终结果也是视图无效 #order by 即使是从select里找到了c2(select中的c2不报错是因为view_stmt),因为select里面的c2也是无效列,因此最终结果也是视图无效
--error 1356 --error 1356
@ -354,7 +354,7 @@ alter table t2 add column c3 int;
select (select c3 from v limit 1) from t2; select (select c3 from v limit 1) from t2;
# #
##Bug ##Bug
# #
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
@ -431,7 +431,7 @@ select * from v2;
select * from v3; select * from v3;
# #
## Bug : ## Bug :
## 主要测试在非select语句引用select_stmt(view展开)的问题,select结果作为其它stmt的输入暂时不支持, ## 主要测试在非select语句引用select_stmt(view展开)的问题,select结果作为其它stmt的输入暂时不支持,
## 这里仅仅针对bug加入回归case ## 这里仅仅针对bug加入回归case
# #
@ -462,12 +462,12 @@ show warnings;
#Bug 对于基表schema失效的视图,查询成功后不应该有warning #Bug 对于基表schema失效的视图,查询成功后不应该有warning
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
drop view if exists v; drop view if exists v;
--enable_warnings --enable_warnings
create table t1(c1 int,c2 int); create table t1(c1 int,c2 int);
create view v as select * from t1; create view v as select * from t1;
alter table t1 drop column c2; alter table t1 drop column c2;
--error 1356 --error 1356
select c1 from v; select c1 from v;
show warnings; show warnings;
@ -488,7 +488,7 @@ select * from xy;
#Bug 创建视图中包含union子句并且类型为char的时候长度出错 #Bug 创建视图中包含union子句并且类型为char的时候长度出错
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop view if exists v; drop view if exists v;
--enable_warnings --enable_warnings
@ -509,7 +509,7 @@ create view v as (select k, v from t1) union (select 1, 1 from t1);
show create view v; show create view v;
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
--enable_warnings --enable_warnings
CREATE TABLE `t11` ( `a` int(11) NOT NULL, `b` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL, PRIMARY KEY (`a`) ); CREATE TABLE `t11` ( `a` int(11) NOT NULL, `b` int(11) DEFAULT NULL, `c` int(11) DEFAULT NULL, PRIMARY KEY (`a`) );