This SQL tutorial for dummies will walk you through a way to limit the execution time of an SQL query.
The way has to do with a MySQL system variable called max_execution_time and this MySQL variable can be set with a SET statement (e.g. SET GLOBAL max_execution_time=X where X is the time in miliseconds) or inside of a SELECT statement like so:
SELECT
/*+ MAX_EXECUTION_TIME(X) */
*
FROM
`demo_table`
WHERE `column` = 'value';
/* After X miliseconds, the query will timeout. */
The time is set in miliseconds and this can be very useful for various purposes. Enjoy and make sure to subscribe to this SQL tutorial channel to see new tutorials on MySQL, Percona Server, MariaDB, PostgreSQL, SQL Server, TimescaleDB, and other database management systems!
Music:
Ocean Drive by Luke Bergs: / bergscloud
Creative Commons — Attribution-ShareAlike 3.0 Unported — CC BY-SA 3.0
Free Download / Stream: https://bit.ly/4dO5BD5
Music promoted by Audio Library https://bit.ly/3SyeVCE
#shorts #reels #coding #data #mysql #mariadb
Смотрите видео Limiting the Execution Time of a Query in MySQL онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Database Dive 11 Август 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2 раз и оно понравилось людям.