1

Topic: Request optimization

Kind time of days!
Prompt as it is possible to accelerate request? Some small tables I connect to the big tables.

SELECT brt.realizationdate;
CASE interface_type
WHEN ' APP_CNP ' THEN
' LH'
ELSE
' CNP'
END channel;
CASE ticc.type_
WHEN 1 THEN
' LOAN'
WHEN 2 THEN
' DEPOSIT'
WHEN 3 THEN
' CARD'
END target;
brt.amount;
tiu.phone_number;
tiu.cuid;
tba.prod_dispatch_note_num
FROM ap_it.t_ib_tbl_ib_card_cnp_transfer ticc
JOIN ap_it.t_ib_tbl_ib_bank_account tba
ON tba.id = ticc.target_acc_id
JOIN owner_int.vh_obs_bc_realizedtransaction brt
ON brt.idrequiredtransaction = ticc.cbs_req_tran_id
JOIN owner_int.vh_obs_bc_bankaccount bba
ON bba.idbankaccount = brt.idbankaccountcredit
JOIN owner_int.vh_obs_bc_person bpe
ON bpe.idperson = bba.idperson
JOIN ap_it.t_ib_tbl_ib_user tiu
ON tiu.cuid = bpe.personextid;
select count (1) from ap_it.t_ib_tbl_ib_card_cnp_transfer t; - 89 333
select count (1) from ap_it.t_ib_tbl_ib_bank_account t; - 97 458
select count (1) from owner_int.vh_obs_bc_realizedtransaction t; - 1 423 789 583
select count (1) from owner_int.vh_obs_bc_bankaccount t; - 86 080 300
select count (1) from owner_int.vh_obs_bc_person t; - 4 670 722
select count (1) from ap_it.t_ib_tbl_ib_user t; - 3 902 449

2

Re: Request optimization

akaipbay wrote:

Some small tables I connect to the big tables.

You here tell, and what for those all surrendered  transactions?

3

Re: Request optimization

Elic, yes it agree with you. The yard is no need me, I do not know as to cut down this big table a productive method.

4

Re: Request optimization

akaipbay so it is necessary to cut down or optimize request? These are different tasks.

5

Re: Request optimization

Alexander_Ttl, to optimize

6

Re: Request optimization

akaipbay, write more in detail, the purpose what and in what complexity? To preempt the table entirely? In request there is no limiting condition, therefore the optimizer uses the plan which gives the maximum speed for sampling of all lines of the table. It is quite logical that at first it is necessary to wait. If it is necessary the first n lines helps  FIRST_ROWS