powered by simpleCommunicator - 2.0.59     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Informix [игнор отключен] [закрыт для гостей] / про оптимизатор
4 сообщений из 4, страница 1 из 1
про оптимизатор
    #34318395
Фотография Журавлев Денис
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Дальше идет моя фантазия (критика и мысли приветствуются) :

Как информикс вычисляет Cost of SEQUENTIAL SCAN?

cost = trunc(nrows*3/100) + npused

RA_PAGES, RA_THRESHOLD, OPTCOMPIND, OPT_GOAL, PAGESIZE, ROWSIZE -- не влияют.


Выполнялся запрос select {+explain, avoid_execute} a from test_w_blob, смотрел на Estimated Cost, Estimated # of Rows Returned.
Зачем *3/100 -- не догадываюсь.


ЗЫЖ Читаю книгу ДЖ.Льюис Oracle Основы Стоимостной Оптимизации. Работать крайне не хочется, поэтому развлекаюсь. Документацию по иформиксу я естественно не читал.
...
Рейтинг: 0 / 0
про оптимизатор
    #34318721
vasilis
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
The optimizer uses cost estimates to determine the optimal query path to use. Each path is assigned a cost estimate based on a formula; the cheapest path is considered the optimal path.

The formula used to calculate the cost is based on the cost of the I/O that will be performed and the amount of CPU that will be needed to process the data. I/O cost is calculated from the estimated number of disk accesses that will be needed to process all the necessary data. CPU cost is based upon the number of tuples processed. This cost is converted to an equivalent I/O cost using a weighting factor. The weighting factor is an adjustment to the CPU cost because processing a row (CPU cost) is
relatively less expensive than a disk access (I/O cost).
The weighting factor is a hard-coded value that cannot be changed.
The full formula used is as follows:
Код: plaintext
1.
2.
3.
4.
cost = (I/O cost) + W * (CPU cost)
where
- I/O cost = number of disk accesses
- CPU cost = number of tuples touched
- W = weighting factor converting CPU cost to relative I/O cost
В более старых материалах (еще 1996 года) было дополнительно написано, что W=0.03
(вот и твой коэффициент 3/100 :)
...
Рейтинг: 0 / 0
про оптимизатор
    #34318767
Фотография Журавлев Денис
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
vasilisThe optimizer uses cost estimates to determine the optimal query path to use. Each path is assigned a cost estimate based on a formula; the cheapest path is considered the optimal path.

The formula used to calculate the cost is based on the cost of the I/O that will be performed and the amount of CPU that will be needed to process the data. I/O cost is calculated from the estimated number of disk accesses that will be needed to process all the necessary data. CPU cost is based upon the number of tuples processed. This cost is converted to an equivalent I/O cost using a weighting factor. The weighting factor is an adjustment to the CPU cost because processing a row (CPU cost) is
relatively less expensive than a disk access (I/O cost).
The weighting factor is a hard-coded value that cannot be changed.Как все просто, оказывается.


vasilisThe full formula used is as follows:
Код: plaintext
1.
2.
3.
4.
cost = (I/O cost) + W * (CPU cost)
where
- I/O cost = number of disk accesses
- CPU cost = number of tuples touched
- W = weighting factor converting CPU cost to relative I/O cost
В более старых материалах (еще 1996 года) было дополнительно написано, что W=0.03
(вот и твой коэффициент 3/100 :)Отлично, одной загадкой меньше.
...
Рейтинг: 0 / 0
про оптимизатор
    #34318836
Фотография Журавлев Денис
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
vasiliscost = (I/O cost) + W * (CPU cost)
Забавно: гугл находит один документ с этой формулой "Test 910: Managing and Optimizing Informix Dynamic".
...
Рейтинг: 0 / 0
4 сообщений из 4, страница 1 из 1
Форумы / Informix [игнор отключен] [закрыт для гостей] / про оптимизатор
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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