我正在运行以下查询:
SELECT *
FROM dblappc.credit_history
WHERE crd_effective_date > TO_DATE('20100801','YYYYMMDD')
AND o_crd_score > 650
AND crd_expiration_date IS NULL
- 上表没有索引
crd_expiration_date
是主键的一部分
如何加快查询速度?
我可以在这里使用并行提示,以便一次至少提供 500 行吗?
下面是表结构:
CREATE TABLE DFQAPP13.CREDIT_HISTORY
(
BAN NUMBER(9) CONSTRAINT CRHST_BAN_NN NOT NULL,
CRD_SEQ_NO NUMBER(9) CONSTRAINT CRDHST_CRD_SEQ_NO_NN NOT NULL,
SYS_CREATION_DATE DATE NOT NULL,
SYS_UPDATE_DATE DATE,
OPERATOR_ID NUMBER(9),
APPLICATION_ID CHAR(6 BYTE),
DL_SERVICE_CODE CHAR(5 BYTE),
DL_UPDATE_STAMP NUMBER(4),
CRD_EFFECTIVE_DATE DATE CONSTRAINT CRDHST_CRD_EFFECTIVE_DATE_NN NOT NULL,
CRD_EXPIRATION_DATE DATE,
CRD_VET_TYPE CHAR(4 BYTE),
O_CRD_APPLIC_NUM NUMBER(9),
O_CRD_DECISION CHAR(2 BYTE),
O_CRD_SCORE NUMBER(7),
O_CRD_POLICY_RULE1 VARCHAR2(40 BYTE),
O_CRD_POLICY_RULE2 VARCHAR2(40 BYTE),
O_CRD_POLICY_RULE3 VARCHAR2(40 BYTE),
O_CRD_POLICY_RULE4 VARCHAR2(40 BYTE),
O_CRD_POLICY_RULE5 VARCHAR2(40 BYTE),
O_CRD_POLICY_RULE6 VARCHAR2(40 BYTE),
CRD_CLASS CHAR(1 BYTE),
CRD_CLASS_CHG_TYPE CHAR(1 BYTE),
CRD_CHG_RSN_TEXT CHAR(100 BYTE),
I_CRD_REQ_CTN_QTY NUMBER(7),
CRD_APR_CTN_QTY NUMBER(7),
I_CRD_BANK_BRANCH VARCHAR2(100 BYTE),
I_CRD_TACT_BANK_CD CHAR(1 BYTE),
I_CRD_BANK_DATE DATE,
I_ESAT_CUST_IND CHAR(1 BYTE),
O_DUNS_RET_CODE1 CHAR(4 BYTE),
O_DUNS_RET_CODE2 CHAR(4 BYTE),
O_DUNS_RET_NUM VARCHAR2(18 BYTE),
O_DUNS_NUM NUMBER(9),
O_DUNS_FIN_STRENGTH CHAR(3 BYTE),
O_DUNS_COMP_COND CHAR(1 BYTE),
O_DUNS_PAYM_SCORE NUMBER(4),
O_DUNS_CCJ1_EIRE NUMBER(6),
O_DUNS_CCJ2_EIRE NUMBER(6),
O_DUNS_CCJ3_EIRE NUMBER(6),
O_DUNS_CCJ4_EIRE NUMBER(6),
O_DUNS_CCJ5_EIRE NUMBER(6),
O_DUNS_CCJ1_UK NUMBER(4),
O_DUNS_CCJ2_UK NUMBER(4),
O_DUNS_CCJ3_UK NUMBER(4),
O_DUNS_CCJ4_UK NUMBER(4),
O_DUNS_CCJ5_UK NUMBER(4),
I_PHONE_TYPE CHAR(3 BYTE),
I_PAID_ENHANCE_NUM NUMBER(1),
I_CHURN_CUST_IND CHAR(1 BYTE),
I_EX_DIRECTORY_IND CHAR(1 BYTE),
I_ITEMISED_BIL_IND CHAR(1 BYTE),
CONV_RUN_NO NUMBER(3)
)