NOTES_OF_PROGRAMMER Telegram 279
Интересная напоминалка, когда использование GROUP BY вместо DISTINCT приводит к более лучшему результату :) И более свежая статья Don’t use DISTINCT as a “join-fixer” - почему может быть не надо использовать DISTINCT для удаления дубликатов записей (это может быть дорого).

Ключевая фраза во всей статье: This is one reason it always bugs me when people say they need to "fix" the operator in the plan with the highest cost. Some operator in the plan will always be the most expensive one; that doesn't mean it needs to be fixed.

Не надо стараца фиксить самый дорогой оператор в плане запроса, всегда вылезет какой-то другой на его место. Надо смотреть что он делает.

Да, и если кто-то собирается повторять запросы из статьи - не скупитесь на тестовые данные (десятки тысяч записей будут в самый раз) . Напоминаю, что если данных будет мало - оптимизатор может тупо забить на index seek и сделать table scan потому что выгоднее :)

#sql
2🔥1



tgoop.com/notes_of_programmer/279
Create:
Last Update:

Интересная напоминалка, когда использование GROUP BY вместо DISTINCT приводит к более лучшему результату :) И более свежая статья Don’t use DISTINCT as a “join-fixer” - почему может быть не надо использовать DISTINCT для удаления дубликатов записей (это может быть дорого).

Ключевая фраза во всей статье: This is one reason it always bugs me when people say they need to "fix" the operator in the plan with the highest cost. Some operator in the plan will always be the most expensive one; that doesn't mean it needs to be fixed.

Не надо стараца фиксить самый дорогой оператор в плане запроса, всегда вылезет какой-то другой на его место. Надо смотреть что он делает.

Да, и если кто-то собирается повторять запросы из статьи - не скупитесь на тестовые данные (десятки тысяч записей будут в самый раз) . Напоминаю, что если данных будет мало - оптимизатор может тупо забить на index seek и сделать table scan потому что выгоднее :)

#sql

BY 📓 Записки программера




Share with your friend now:
tgoop.com/notes_of_programmer/279

View MORE
Open in Telegram


Telegram News

Date: |

More>> Don’t publish new content at nighttime. Since not all users disable notifications for the night, you risk inadvertently disturbing them. Private channels are only accessible to subscribers and don’t appear in public searches. To join a private channel, you need to receive a link from the owner (administrator). A private channel is an excellent solution for companies and teams. You can also use this type of channel to write down personal notes, reflections, etc. By the way, you can make your private channel public at any moment. Unlimited number of subscribers per channel According to media reports, the privacy watchdog was considering “blacklisting” some online platforms that have repeatedly posted doxxing information, with sources saying most messages were shared on Telegram.
from us


Telegram 📓 Записки программера
FROM American