Медленный запрос с драйвером odb c - PullRequest
0 голосов
/ 29 апреля 2020

У меня есть таблица с 1 000 000 записей.

create table CCM.SPVACTION_STOPPER
(
  revision                    NUMBER default 0 not null,
  heat_id                     VARCHAR2(16) default ' ' not null,
  strand_num                  NUMBER default 0 not null,
  stopper_position            NUMBER default 0 not null,
  speed_value                 NUMBER default 0,
  mould_level                 NUMBER default 0,
  ladel_net_steel_wgt         NUMBER default 0,
  tundish_net_steel_wgt       NUMBER default 0,
  ladel_calculation_steel_wgt NUMBER default 0,
  casting_lenght              NUMBER default 0
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
-- Create/Recreate indexes 
create index CCM.IND2_SPVSTOPP on CCM.SPVACTION_STOPPER (HEAT_ID)
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
create index CCM.IND3_SPVSTOPP on CCM.SPVACTION_STOPPER (REVISION)
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
create index CCM.IND_SPVSTOPP on CCM.SPVACTION_STOPPER (HEAT_ID, REVISION)
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );

Когда я запускаю этот запрос с ODB C

select * from ccm.spvaction_stopper 
where heat_id = :heatID and rownum<10

В строке Command.ExecuteReader() скажем ошибка

{"ERROR [HYT00] [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operation\n"}

Но при выполнении этого запроса с драйвером OLEDB или при запуске int PL SQl выполняется менее чем за 1 секунду.

Пожалуйста, помогите мне быстро выполнить этот запрос с ODB C.

(я использую. net framework4)

1 Ответ

0 голосов
/ 02 мая 2020

Я добавляю QTO=F в строку подключения для предотвращения

ORA-01013: user requested cancel of current operation

Ошибка

QTO=F используется для отключения тайм-аута запроса.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...