powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Oracle [игнор отключен] [закрыт для гостей] / Не используется индекс по dblink
3 сообщений из 3, страница 1 из 1
Не используется индекс по dblink
    #39431060
Петров Андрей
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Имеется запрос

Код: plsql
1.
2.
3.
4.
5.
select t.field1
from table1 t
left outer join table2@dblink1 d on d.field3 = t.field4
where t.field2 = '1234'
and d.feild5 is null



Т.е. выбираем данные из table1 и пытаемся найти те, которых нет в table2 по индексу на поле field3
Но по факту table2 фуллсканится, почему?
...
Рейтинг: 0 / 0
Не используется индекс по dblink
    #39431070
Петров Андрей, CARDINALITY + USE_NL (или event 10053 - там всё будет)
...
Рейтинг: 0 / 0
Не используется индекс по dblink
    #39431223
SQL*Plus
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Петров Андрей,

Используйте хинт DRIVING_SITE

Oracle® Database
SQL Language Reference
12c Release 2 (12.2)
E49448-12The DRIVING_SITE hint instructs the optimizer to execute the query at a different site
than that selected by the database. This hint is useful if you are using distributed
query optimization.

For example:
Код: plsql
1.
2.
3.
4.
SELECT /*+ DRIVING_SITE(departments) */ *
FROM employees, departments@rsite
WHERE employees.department_id = departments.department_id;


If this query is executed without the hint, then rows from departments are sent to
the local site, and the join is executed there. With the hint, the rows from employees
are sent to the remote site, and the query is executed there and the result set is
returned to the local site.
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / Oracle [игнор отключен] [закрыт для гостей] / Не используется индекс по dblink
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]