{"id":1580,"date":"2025-01-30T15:12:59","date_gmt":"2025-01-30T12:12:59","guid":{"rendered":"https:\/\/aristov.tech\/blog\/?p=1580"},"modified":"2025-02-01T04:24:59","modified_gmt":"2025-02-01T01:24:59","slug":"troubleshooting-postgresql-indexes","status":"publish","type":"post","link":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/","title":{"rendered":"Troubleshooting PostgreSQL Indexes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0430 \u201cTroubleshooting PostgreSQL Indexes\u201d. \u0417\u0430\u043f\u0438\u0441\u044c \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432\u00a0<a href=\"https:\/\/youtu.be\/Rea6DbcSd0U\">youtube<\/a>,\u00a0<a href=\"https:\/\/rutube.ru\/video\/ab0d9e140bfc10f7132989537201bb33\/\">rutube<\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/vkvideo.ru\/video-212716752_456239112\">VK \u0412\u0438\u0434\u0435\u043e<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e&nbsp;<a href=\"https:\/\/github.com\/aeuge\/aristov_tech\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0430 \u043b\u0435\u043a\u0446\u0438\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL. \u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u043b\u0438, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0430<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u043d\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f<\/li>\n\n\n\n<li>\u0417\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0442\u0430\u0432\u043a\u0438<\/li>\n\n\n\n<li>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0435<\/li>\n\n\n\n<li>\u0423\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438<\/li>\n\n\n\n<li>\u041f\u0430\u0434\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u044b<a href=\"https:\/\/habr.com\/ru\/companies\/quadcode\/articles\/696498\/\"> Btree ( \u0432 PostgreSQL \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Btree+)<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 99% \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432. \u041e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 (\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d), \u043d\u043e \u0438 \u043d\u0430 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0443.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0432\u0441\u0435\u0445 \u0432\u0438\u0434\u0430\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 <a href=\"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/\">\u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0434 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0438\u0441\u043a \u0447\u0438\u0441\u043b\u0430 38 \u043d\u0430 \u0434\u0435\u0440\u0435\u0432\u0435 Btree+. \u041e\u0442 \u043a\u043e\u0440\u043d\u044f \u0434\u043e \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e \u043b\u0438\u0441\u0442\u0430 \u0434\u043e\u0445\u043e\u0434\u0438\u043c \u0437\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"450\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image.png\" alt=\"\" class=\"wp-image-1581\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image.png 800w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-768x432.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u0442\u043e\u0433\u043e &#8212; \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u0432 \u043a\u043e\u0440\u043d\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u0430 \u0438 \u0443\u0445\u043e\u0434\u0438\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043e. \u0422\u0430\u043a\u0438\u043c \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0438\u0441\u043a\u043e\u043c\u043e\u0435 \u0447\u0438\u0441\u0442\u043e \u0443\u0436\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043b\u0438\u0441\u0442\u044c\u0435\u0432.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0443 &lt;38.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"450\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-1.png\" alt=\"\" class=\"wp-image-1582\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-1.png 800w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-1-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-1-768x432.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0437-\u0437\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043d\u0430 \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 &#8212; \u0443\u0440\u043e\u0432\u043d\u0435 \u043b\u0438\u0441\u0442\u044c\u0435\u0432, \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c\u0441\u044f \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 Btree \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430, \u0433\u0434\u0435 \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u043b\u0438\u0441\u0442\u044c\u0435\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0432\u044b\u0448\u0435, \u0432 PostgreSQL \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 Btree+ \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043b\u0438\u0441\u0442\u044c\u0435\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043b\u0438\u0441\u0442.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/medium.com\/@lordmoma\/why-using-b-tree-indexing-in-sql-6a3203ed57a5\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 Btree+.<\/a> \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 90% \u043c\u0435\u0441\u0442, 10% \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b. \u042d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u0435 \u0438\u0437\u043b\u0438\u0448\u043d\u0435\u0439 \u043f\u0435\u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438. \u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 20, \u043e\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. \u0410 \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 13 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430, \u0441\u0441\u044b\u043b\u043a\u0430 \u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"313\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-2-1024x313.png\" alt=\"\" class=\"wp-image-1583\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-2-1024x313.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-2-300x92.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-2-768x235.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-2.png 1180w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"303\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-3-1024x303.png\" alt=\"\" class=\"wp-image-1584\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-3-1024x303.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-3-300x89.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-3-768x227.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-3.png 1209w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0434\u0435\u0440\u0435\u0432\u0430 \u043f\u0435\u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0430, \u043d\u043e \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u0445, \u043e\u043d\u0430 \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0430 \u043f\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a: \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044f\u0447\u0435\u0439\u043a\u0443 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439, \u0443\u0436\u0435 \u0437\u0430\u043d\u044f\u0442\u044b\u0439 \u043b\u0438\u0441\u0442, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043b\u0438\u0441\u0442, \u0442\u0443\u0434\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"307\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-4-1024x307.png\" alt=\"\" class=\"wp-image-1585\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-4-1024x307.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-4-300x90.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-4-768x230.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-4.png 1183w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/iq.opengenus.org\/b-tree-deletion\/\">\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/a> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c. \u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 65 \u0435\u0433\u043e \u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 60. \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430. \u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 70 \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430, \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0435\u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"450\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-5.png\" alt=\"\" class=\"wp-image-1586\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-5.png 800w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-5-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-5-768x432.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u0422\u0438\u043f\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/li>\n\n\n\n<li>\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/li>\n\n\n\n<li>\u0421\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/li>\n\n\n\n<li>\u041f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 (\u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 11 \u0432\u0435\u0440\u0441\u0438\u0438)<\/li>\n\n\n\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 (\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0435\u0435 \u0442\u0438\u043f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c IMMUTABLE)<\/li>\n\n\n\n<li>\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043a\u0430\u043a NOT NULL, \u0438\u043d\u0430\u0447\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e NULL \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 PostgreSQL NULL &lt;&gt; NULL<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 fk1002_2 \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c CONSTRAINT, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u043a\u0430\u043a NOT NULL. CONSTRAINT \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u043e\u0431\u0430 \u0447\u0435\u0440\u0435\u0437 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE fk1002_2(\n    id integer,\n    CONSTRAINT fk1002_2_unique UNIQUE (id)\n);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 NULL \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO fk1002_2 VALUES \n    (10), \n    (20), \n    (NULL), \n    (NULL);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"142\" height=\"159\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-6.png\" alt=\"\" class=\"wp-image-1587\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0447\u0438\u0441\u0442\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0451 \u0437\u0430\u043d\u043e\u0432\u043e \u0431\u0435\u0437 NULL \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DROP TABLE IF EXISTS fk1002_2;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE fk1002_2(\n    id integer,\n    CONSTRAINT fk1002_2_unique UNIQUE (id)\n);\n\nINSERT INTO fk1002_2 VALUES \n    (10), \n    (20);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"147\" height=\"105\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-7.png\" alt=\"\" class=\"wp-image-1588\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE fk1002_2_fk(\n    fk1002_2_id integer,\n    CONSTRAINT fk1002_2_fk_fk1002_2 FOREIGN KEY (fk1002_2_id) REFERENCES fk1002_2(id)\n);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO fk1002_2_fk VALUES \n    (10), \n    (20), \n    (NULL), \n    (NULL);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"264\" height=\"158\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-8.png\" alt=\"\" class=\"wp-image-1589\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u0445\u043e\u0442\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u0435 \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e NOT NULL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0447\u0438\u0441\u0442\u0438\u043c \u043e\u0431\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u0445 \u0437\u0430\u043d\u043e\u0432\u043e.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DROP TABLE IF EXISTS fk1002_2_fk;\nDROP TABLE IF EXISTS fk1002_2;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u0431\u043b\u0438\u0446\u0430 fk1002_2 \u0441 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c (id, value):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE fk1002_2(\n    id integer NOT NULL,\n    value varchar(10),\n    CONSTRAINT fk1002_2_unique UNIQUE (id, value)\n);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u0431\u043b\u0438\u0446\u0430 fk1002_2_fk, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE fk1002_2_fk(\n    fk1002_2_id integer NOT NULL,\n    fk1002_2_value varchar(10),\n    CONSTRAINT fk1002_2_fk_fk1002_2 FOREIGN KEY (fk1002_2_id, fk1002_2_value) REFERENCES fk1002_2(id, value)\n);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO fk1002_2 (id, value) VALUES \n    (10, NULL);\nINSERT INTO fk1002_2 (id, value) VALUES \n    (20, '20');<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"252\" height=\"101\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-9.png\" alt=\"\" class=\"wp-image-1590\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO fk1002_2_fk (fk1002_2_id, fk1002_2_value) VALUES\n    (20, '20');\nINSERT INTO fk1002_2_fk (fk1002_2_id, fk1002_2_value) VALUES\n    (30, NULL);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"375\" height=\"112\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-10.png\" alt=\"\" class=\"wp-image-1591\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-10.png 375w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-10-300x90.png 300w\" sizes=\"auto, (max-width: 375px) 100vw, 375px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 30, \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439, \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0439\u0442\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 NOT NULL!<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e CONSTRAINT<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 CONSTRAINT \u0447\u0438\u0442\u0430\u0439\u0442\u0435<a href=\"https:\/\/aristov.tech\/blog\/database-scheme-table-postgresql\/\"> \u0432 \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044e <strong><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-set-constraints.html\">\u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e CONSTRAINT<\/a><\/strong> \u0437\u0430 \u043e\u0434\u043d\u0438\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>DEFERRABLE<\/strong> \n<strong>NOT DEFERRABLE (default)<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0431\u044b\u0442\u044c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c. \u041d\u0435\u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u043d\u0435\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u0430 \u0434\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 (\u043e\u0431\u044b\u0447\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b SET CONSTRAINTS).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f UNIQUE, PRIMARY KEY, EXCLUDE \u0438 REFERENCES (\u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f <strong>\u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f<\/strong> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u0438 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0435 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">INSERT \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c ON CONFLICT DO UPDATE.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 <strong>DEFERRABLE <\/strong>&#8212;<strong> <\/strong>\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>INITIALLY IMMEDIATE (default)<\/strong> \n<strong>INITIALLY DEFERRED<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u043e\u0439 INITIALLY IMMEDIATE \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 INITIALLY DEFERRED, \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/emmer.dev\/blog\/deferrable-constraints-in-postgresql\/\">Deferrable Constraints in PostgreSQL | Christian Emmer<\/a><\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c GIN \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423 GIN-\u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f fastupdate, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0437\u0436\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE INDEX ON ts USING gin(doc_tsv) \n    with (fastupdate = true);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 (\u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445). \u041a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c, \u043b\u0438\u0431\u043e \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0438, \u0432\u0441\u0435 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u043c\u043e\u043c\u0435\u043d\u0442\u043d\u043e \u0432\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441. \u0427\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u00ab\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u00bb \u0441\u043f\u0438\u0441\u043a\u043e\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c gin_pending_list_limit \u0438\u043b\u0438 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a (\u0437\u0430 \u0441\u0447\u0435\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u0440\u043e\u043c\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u0438 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a)<\/li>\n\n\n\n<li>\u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0435\u0441\u043b\u0438 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0438\u043b\u0441\u044f<\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 &#8212; \u043b\u0443\u0447\u0448\u0435?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0430 \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0434\u043d\u0430\u043a\u043e:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0420\u0430\u0437\u043c\u0435\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0430\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/li>\n\n\n\n<li>\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b, \u0430 \u043d\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435<\/li>\n\n\n\n<li>\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u0441\u0442\u0430\u0432\u043a\u0438\/\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0443\u043f\u0430\u0441\u0442\u044c<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0411\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u043e\u043b\u044c\u043a\u043e OLAP \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u0421\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0432 PostgreSQL \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0411\u0435\u0440\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043d\u0430 ~200 \u043c\u043b\u043d. \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0427\u0438\u043a\u0430\u0433\u0441\u043a\u043e\u0435 \u0442\u0430\u043a\u0441\u0438 \u0432 <strong>BigQuery<\/strong> (\u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043d\u0430\u0431\u043e\u0440\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT count(*) \nFROM `bigquery-public-data.chicago_taxi_trips.taxi_trips`;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"877\" height=\"574\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-11.png\" alt=\"\" class=\"wp-image-1592\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-11.png 877w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-11-300x196.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-11-768x503.png 768w\" sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043e\u0442\u0447\u0451\u0442 &#8212; \u0441\u0443\u043c\u043c\u0430 \u0447\u0430\u0435\u0432\u044b\u0445 \u043f\u043e \u0442\u0438\u043f\u0430\u043c \u0447\u0430\u0435\u0432\u044b\u0445. \u041d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0437\u0430\u0442\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0435\u0433\u043e 0.9 \u0441\u0435\u043a\u0443\u043d\u0434\u044b:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"654\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-12-1024x654.png\" alt=\"\" class=\"wp-image-1593\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-12-1024x654.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-12-300x192.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-12-768x490.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-12.png 1239w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u043d\u0430\u0448\u0435\u043c PostgreSQL.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"471\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-13-1024x471.png\" alt=\"\" class=\"wp-image-1594\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-13-1024x471.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-13-300x138.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-13-768x353.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-13-1536x706.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-13.png 1546w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u043e\u0442 \u0436\u0435 \u043e\u0442\u0447\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f 30 <strong>\u041c\u0418\u041d\u0423\u0422<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u043b\u044f\u043c \u043a\u0430\u043a \u0438 \u0442\u044e\u043d\u0438\u043d\u0433 PostgreSQL \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043f\u0440\u0435\u043c\u0441\u044f \u0432 \u0434\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439<strong> <\/strong>\u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE INDEX idx_taxi \nON taxi_trips(payment_type, tips, fare);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Time: 1370972.471 ms (22:50.972)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a\u0436\u0435 \u0441 11 \u0432\u0435\u0440\u0441\u0438\u0438 PostgreSQL \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE INDEX idx_taxi2 \nON taxi_trips(payment_type) include (tips, fare);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Time: 932280.011 ms (15:32.280)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u043e payment_type, \u0434\u0430\u043b\u0435\u0435 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043b\u0438\u0441\u0442\u0435 \u0435\u0449\u0451 \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u043e tips \u0438, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u043e fare. \u042d\u0442\u043e \u0434\u043e\u0440\u043e\u0436\u0435 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. \u0423 \u043d\u0435\u0433\u043e, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u043e payment_type, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0432\u0430 \u043f\u043e\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0435\u0436\u0430\u0442 \u0440\u044f\u0434\u043e\u043c \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435. \u041d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"375\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-14-1024x375.png\" alt=\"\" class=\"wp-image-1595\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-14-1024x375.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-14-300x110.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-14-768x281.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-14-1536x563.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-14.png 1850w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Seq Scan, \u0445\u043e\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u044b.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ANALYZE taxi_trips;\nTime: 3057.809 ms (00:03.058)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0430\u043b\u0435\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043c Seq Scan:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"343\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-16-1024x343.png\" alt=\"\" class=\"wp-image-1597\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-16-1024x343.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-16-300x100.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-16-768x257.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-16-1536x514.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-16.png 1701w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445, \u043e\u0434\u043d\u0430\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0440\u043e\u0441\u043b\u0430, \u043a\u0430\u043a \u0438 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 JIT \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0442\u0432\u0435\u0442 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>After adding or deleting a large number of rows, it might be a good idea to issue a <\/em><strong><em>VACUUM ANALYZE<\/em><\/strong><em> command for the affected table. This will update the system catalogs with the results of all recent changes, and allow the PostgreSQL query planner to make better choices in planning queries.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 <strong><em>VACUUM ANALYZE<\/em><\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043a\u0430\u0440\u0442\u0443 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Parallel index Scan:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"315\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-19-1024x315.png\" alt=\"\" class=\"wp-image-1600\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-19-1024x315.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-19-300x92.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-19-768x236.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-19-1536x473.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-19.png 1706w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u0434\u043e 1 \u043c\u0438\u043d\u0443\u0442\u044b:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"470\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-18-1024x470.png\" alt=\"\" class=\"wp-image-1599\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-18-1024x470.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-18-300x138.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-18-768x352.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-18-1536x705.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-18.png 1632w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e <a href=\"https:\/\/console.cloud.google.com\/storage\/browser\/chicago10  gsutil\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a \u0447\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/citusdata.github.io\/cstore_fdw\/\">cstore_fdw<\/a><\/li>\n\n\n\n<li>\u043f\u0440\u0435\u0434\u0430\u0433\u0440\u0435\u0433\u0430\u0442\u044b (\u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438)<\/li>\n\n\n\n<li>\u043c\u0430\u0442. \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/li>\n\n\n\n<li>\u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b<\/li>\n\n\n\n<li>clickhouse<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a\u0436\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a) \u0438 PostgreSQL \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u0447\u0435\u043c \u0431\u0435\u0433\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u044e\u0434\u0430<\/li>\n\n\n\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u043d\u043e \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043b\u0438 \u0442\u0438\u043f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/li>\n\n\n\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u043d\u043e \u043f\u043e\u0438\u0441\u043a (\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430) \u0432\u0435\u0434\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u043c \u043a\u043b\u044e\u0447\u0430\u043c. \u0415\u0441\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432, \u0447\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n\n\n\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435&nbsp;\u043f\u0440\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u043f\u043e\u043b\u0435\u0439<\/li>\n\n\n\n<li>\u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043e\u043a<\/li>\n\n\n\n<li>\u0438\u043d\u0434\u0435\u043a\u0441 \u041d\u0415\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 (\u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f \u0438\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0440\u043e\u0438\u043b\u0441\u044f)<\/li>\n\n\n\n<li>\u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044e\/\u043f\u043e\u043b\u044f\u043c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.postgresql.org\/docs\/current\/indexes-examine.html\">\u041d\u0430 \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u043c\u0435\u043d\u044b \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043d\u0435\u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE INDEX mytable_cat_1 ON mytable (data) WHERE category = 1;<br>CREATE INDEX mytable_cat_2 ON mytable (data) WHERE category = 2;<br>CREATE INDEX mytable_cat_3 ON mytable (data) WHERE category = 3;<br>\u2026<br>CREATE INDEX mytable_cat_N ON mytable (data) WHERE category = N;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c n \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE INDEX mytable_cat_data ON mytable (category, data);<\/code><\/pre>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 MSSQL:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/slidesz\/AGV_vUdyG6NdP9GikfUhr4L8qv1mShaAXFbTn6LodwFdgyIZaJJ7e9oLAhbo-0PYtihfik3kqxu3cgvl9IynSDV7ckzQlZQX8ZCBmNTRVCUVE9lDvz9ZsCMC9NpSwDEk88z2-G3VXqZsfg=s2048?key=eWQy9oq4UzG_XUhRWa8cX42n\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/sqlhints.com\/tag\/clustered-index-b-tree-structure\/\">\u041a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/a> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441 \u043d\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u043d\u0430 \u0434\u0438\u0441\u043a\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0435\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u0421\u043c\u044b\u0441\u043b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u0440\u0435\u043d\u044c \u0441\u0440\u0430\u0437\u0443 \u0434\u0430\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0434\u0438\u0441\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 &#8212; \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-cluster.html\">\u0412 PostgreSQL \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/a> \u041a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0438\u0437-\u0437\u0430 \u0440\u0430\u0431\u043e\u0442\u044b <a href=\"https:\/\/aristov.tech\/blog\/tranzakczii-i-mvcc\/\">\u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 MVCC<\/a>: \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u044e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0439 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 update\/insert\/delete \u0432 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443\u0442.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-reindex.html#SQL-REINDEX-CONCURRENTLY\">\u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0439<\/a> \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u0418\u043d\u0430\u0447\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435\/\u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0439<strong> <\/strong>\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"288\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-21-1024x288.png\" alt=\"\" class=\"wp-image-1602\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-21-1024x288.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-21-300x84.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-21-768x216.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-21-1536x432.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-21.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0437\u0434\u0430\u043b\u0441\u044f \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439  \u0438\u043d\u0434\u0435\u043a\u0441, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u0442.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u044e:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"159\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-22-1024x159.png\" alt=\"\" class=\"wp-image-1603\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-22-1024x159.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-22-300x47.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-22-768x119.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-22-1536x239.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-22.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"303\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-23-1024x303.png\" alt=\"\" class=\"wp-image-1604\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-23-1024x303.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-23-300x89.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-23-768x227.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-23-1536x454.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-23.png 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>Reindex<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438 UPDATE \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u043e \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. VACUUM \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442, \u043e\u043d \u043d\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435 \u0434\u0432\u0443\u0445 UPDATE:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"421\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-24.png\" alt=\"\" class=\"wp-image-1606\" style=\"width:361px;height:auto\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-24.png 556w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-24-300x227.png 300w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"559\" height=\"425\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-25.png\" alt=\"\" class=\"wp-image-1607\" style=\"width:362px;height:auto\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-25.png 559w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image-25-300x228.png 300w\" sizes=\"auto, (max-width: 559px) 100vw, 559px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u0441\u0436\u0430\u0442\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u044b\u0439 reindex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043e\u0441\u0442\u0430\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0441\u0442\u0438 \u043b\u0438\u0441\u0442\u044c\u0435\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/li>\n\n\n\n<li>\u043f\u0440\u0438 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438<\/li>\n\n\n\n<li>\u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0443\u0441\u0442\u044b\u0445 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043b\u0438\u0441\u0442\u044c\u0435\u0432<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u043c<\/li>\n\n\n\n<li>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c (seqscan)\n<ul class=\"wp-block-list\">\n<li>\u0435\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f &#8212; seqscan \u0431\u044b\u0441\u0442\u0440\u0435\u0435<\/li>\n\n\n\n<li>\u0435\u0441\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c\/\u043d\u0438\u0437\u043a\u0430\u044f \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0443\u0436\u0441\u043a\u043e\u0439 \u0438 \u0436\u0435\u043d\u0441\u043a\u0438\u0439 \u043f\u043e\u043b) &#8212; \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0435\u0442<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0430 \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432\u043b\u0438\u044f\u0435\u0442<strong> <\/strong>\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<strong> maintenance_work_mem<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e <strong>CONCURRENTLY<\/strong>:<\/li>\n\n\n\n<li>\u0411\u0435\u0437 \u043d\u0435\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u0430\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430<\/li>\n\n\n\n<li>\u0415\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e CLUSTER &#8212; \u0442\u044f\u0436\u0435\u043b\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f\n<ul class=\"wp-block-list\">\n<li>\u0434\u043e\u0440\u043e\u0433\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 &#8212; \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f<\/li>\n\n\n\n<li>\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">TOAST \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u044b \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u043a\u0436\u0435<strong><em> <\/em><\/strong>\u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u043a\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 VACUUM.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u041e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 GIN \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/340978\">\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 Btree \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0438\u0437 GIN-\u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0442\u044c, \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f, \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u043d\u043e \u043d\u0430\u0431\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u2014  \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u043d. \u0422\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f REINDEX INDEX CONCURRENTLY \u0432 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GIN \u0438\u043d\u0434\u0435\u043a\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0437\u0430\u043c\u0435\u043d\u0430 ILIKE &#8212; index on lower(text)<\/li>\n\n\n\n<li>to_tsvector &#8212; \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 (GIN index) &#8212; \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0435\u043b\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u0430 \u041d\u0415 \u0414\u041e\u0411\u0410\u0412\u041b\u042f\u0415\u041c \u043f\u043e\u043b\u0435<\/li>\n\n\n\n<li><a href=\"https:\/\/habr.com\/ru\/articles\/341142\/\">\u0438\u0449\u0435\u043c \u0438\u043c\u0435\u043d\u0430 \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430\u043c\u0438 \u0432 PostgreSQL &#8212; trigrams <\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0426\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044f, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u043e\u043b\u0431\u0446\u0435 \u0441\u0441\u044b\u043b\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043b\u044e\u0447\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u042d\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u043e\u0439 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 JOIN-\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f (JOIN) \u043c\u0435\u0436\u0434\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438, \u0442\u0430\u043a \u043a\u0430\u043a PostgreSQL \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043b\u0430\u043d\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 DELETE \u0438 UPDATE<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0417\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0442\u0430\u0432\u043e\u043a, \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043b\u0435\u0447\u044c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0412\u044b\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438\u043b\u0438 \u0438\u0445 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0438\u0437\u043b\u0438\u0448\u043d\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0443\u0445\u0443\u0434\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 90% \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u0442\u043e\u0438\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441, \u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u0430\u0445<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/pgexperts\/pgx_scripts\/blob\/master\/indexes\/fk_no_index.sql\">\u041d\u0430\u0439\u0442\u0438 FK \u0431\u0435\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\">Postgres \u0438 <\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\">\u0438\u043d\u0434\u0435\u043a\u0441\u044b<\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\"> \u043d\u0430 <\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\">\u0432\u043d\u0435\u0448\u043d\u0438\u0445<\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\"> <\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\">\u043a\u043b\u044e\u0447\u0430\u0445<\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\"> \u0438 <\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\">\u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445<\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\"> <\/a><a href=\"https:\/\/coderoad.ru\/970562\/Postgres-%D0%B8-%D0%B8%D0%BD%D0%B4%D0%B5%D0%BA%D1%81%D1%8B-%D0%BD%D0%B0-%D0%B2%D0%BD%D0%B5%D1%88%D0%BD%D0%B8%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85-%D0%B8-%D0%BF%D0%B5%D1%80%D0%B2%D0%B8%D1%87%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B0%D1%85\">\u043a\u043b\u044e\u0447\u0430\u0445<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.sql.ru\/forum\/1302196\/indeksy-na-polya-s-foreign-key\">\u0418\u043d\u0434\u0435\u043a\u0441\u044b<\/a><a href=\"https:\/\/www.sql.ru\/forum\/1302196\/indeksy-na-polya-s-foreign-key\"> \u043d\u0430 <\/a><a href=\"https:\/\/www.sql.ru\/forum\/1302196\/indeksy-na-polya-s-foreign-key\">\u043f\u043e\u043b\u044f<\/a><a href=\"https:\/\/www.sql.ru\/forum\/1302196\/indeksy-na-polya-s-foreign-key\"> \u0441 foreign key \/ PostgreSQL \/ Sql.ru<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 PostgreSQL 17 \u0432\u0441\u0451 \u043d\u0435\u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e &#8212; \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0441\u0442\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u044b FK \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>pg_stat_io<\/li>\n\n\n\n<li>pg_statio_all_tables<\/li>\n\n\n\n<li>pg_statio_all_indexes<\/li>\n\n\n\n<li>pg_store_plans<\/li>\n\n\n\n<li>pg_stat_all_tables<\/li>\n\n\n\n<li>pg_stat_all_indexes<\/li>\n\n\n\n<li>pg_stat_kcache<\/li>\n\n\n\n<li>pg_wait_sampling<\/li>\n\n\n\n<li>pg_buffercache<\/li>\n\n\n\n<li>pgstattuple<\/li>\n\n\n\n<li>pg_stat_archiever<\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>HypoPG<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e 100% \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u043d\u0430\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0440\u043e\u0433\u043e \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <a href=\"https:\/\/github.com\/HypoPG\/hypopg\">\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/a>.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong>Checklist<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/li>\n\n\n\n<li>\u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b<\/li>\n\n\n\n<li>\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u043f\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438<\/li>\n\n\n\n<li>\u043f\u043e\u043c\u043d\u0438\u043c \u043f\u0440\u043e HypoPG<\/li>\n\n\n\n<li>\u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n\n\n\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/li>\n\n\n\n<li>\u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u043e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0443\u0440\u043e\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 <a href=\"https:\/\/aristov.tech\/blog\/otkrytye-lekczii-ot-aristov-tech\/\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0430 \u201cTroubleshooting PostgreSQL Indexes\u201d. \u0417\u0430\u043f\u0438\u0441\u044c \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432\u00a0youtube,\u00a0rutube\u00a0\u0438\u00a0VK \u0412\u0438\u0434\u0435\u043e. \u041f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e&nbsp;\u0441\u0441\u044b\u043b\u043a\u0435. \u041d\u0430 \u043b\u0435\u043a\u0446\u0438\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL. \u0414\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u043b\u0438, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432: \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u044b Btree ( \u0432 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,11],"tags":[310,252,314,317,16,369,68,66],"class_list":["post-1580","post","type-post","status-publish","format-standard","hentry","category-optimizacziya-postgresql","category-ustrojstvo-postgresql","tag-btree","tag-constraint","tag-gin","tag-indexes","tag-postgresql","tag-reindex","tag-evgenij-aristov","tag-obuchenie"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Troubleshooting PostgreSQL Indexes - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f<\/title>\n<meta name=\"description\" content=\"\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Troubleshooting PostgreSQL Indexes - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\" \/>\n<meta property=\"og:description\" content=\"\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-30T12:12:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-01T01:24:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Maria\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"Maria\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 \u043c\u0438\u043d\u0443\u0442\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/\"},\"author\":{\"name\":\"Maria\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/6a152749a3dde76f19cc30db676d2310\"},\"headline\":\"Troubleshooting PostgreSQL Indexes\",\"datePublished\":\"2025-01-30T12:12:59+00:00\",\"dateModified\":\"2025-02-01T01:24:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/\"},\"wordCount\":1979,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/image.png\",\"keywords\":[\"btree\",\"constraint\",\"gin\",\"indexes\",\"postgresql\",\"reindex\",\"\u0435\u0432\u0433\u0435\u043d\u0438\u0439 \u0430\u0440\u0438\u0441\u0442\u043e\u0432\",\"\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\"],\"articleSection\":[\"\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f PostgreSQL\",\"\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PostgreSQL\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/\",\"name\":\"Troubleshooting PostgreSQL Indexes - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/image.png\",\"datePublished\":\"2025-01-30T12:12:59+00:00\",\"dateModified\":\"2025-02-01T01:24:59+00:00\",\"description\":\"\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/#primaryimage\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/image.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/image.png\",\"width\":800,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/troubleshooting-postgresql-indexes\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Troubleshooting PostgreSQL Indexes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/\",\"name\":\"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\",\"name\":\"admin2\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\",\"width\":180,\"height\":180,\"caption\":\"admin2\"},\"logo\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/blog-logo.png\"},\"sameAs\":[\"https:\\\/\\\/aristov.tech\\\/blog\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/6a152749a3dde76f19cc30db676d2310\",\"name\":\"Maria\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g\",\"caption\":\"Maria\"},\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/author\\\/maria\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Troubleshooting PostgreSQL Indexes - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","description":"\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/","og_locale":"ru_RU","og_type":"article","og_title":"Troubleshooting PostgreSQL Indexes - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","og_description":"\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b.","og_url":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/","og_site_name":"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","article_published_time":"2025-01-30T12:12:59+00:00","article_modified_time":"2025-02-01T01:24:59+00:00","og_image":[{"width":800,"height":450,"url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image.png","type":"image\/png"}],"author":"Maria","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"Maria","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"16 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/#article","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/"},"author":{"name":"Maria","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/6a152749a3dde76f19cc30db676d2310"},"headline":"Troubleshooting PostgreSQL Indexes","datePublished":"2025-01-30T12:12:59+00:00","dateModified":"2025-02-01T01:24:59+00:00","mainEntityOfPage":{"@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/"},"wordCount":1979,"commentCount":0,"publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"image":{"@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image.png","keywords":["btree","constraint","gin","indexes","postgresql","reindex","\u0435\u0432\u0433\u0435\u043d\u0438\u0439 \u0430\u0440\u0438\u0441\u0442\u043e\u0432","\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435"],"articleSection":["\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f PostgreSQL","\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e PostgreSQL"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/","url":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/","name":"Troubleshooting PostgreSQL Indexes - \u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/#primaryimage"},"image":{"@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image.png","datePublished":"2025-01-30T12:12:59+00:00","dateModified":"2025-02-01T01:24:59+00:00","description":"\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0441\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u044b.","breadcrumb":{"@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/#primaryimage","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2025\/01\/image.png","width":800,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/aristov.tech\/blog\/troubleshooting-postgresql-indexes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/aristov.tech\/blog\/"},{"@type":"ListItem","position":2,"name":"Troubleshooting PostgreSQL Indexes"}]},{"@type":"WebSite","@id":"https:\/\/aristov.tech\/blog\/#website","url":"https:\/\/aristov.tech\/blog\/","name":"\u0411\u043b\u043e\u0433 \u043f\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 PostgreSQL \u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f","description":"","publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/aristov.tech\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":["Person","Organization"],"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7","name":"admin2","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png","width":180,"height":180,"caption":"admin2"},"logo":{"@id":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2023\/05\/blog-logo.png"},"sameAs":["https:\/\/aristov.tech\/blog"]},{"@type":"Person","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/6a152749a3dde76f19cc30db676d2310","name":"Maria","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/secure.gravatar.com\/avatar\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a86c8edd49a73db805cc02e271f5fc126b109c146ad0d8976829c538b3b94ca4?s=96&d=mm&r=g","caption":"Maria"},"url":"https:\/\/aristov.tech\/blog\/author\/maria\/"}]}},"_links":{"self":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/1580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/comments?post=1580"}],"version-history":[{"count":12,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/1580\/revisions"}],"predecessor-version":[{"id":1626,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/1580\/revisions\/1626"}],"wp:attachment":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/media?parent=1580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/categories?post=1580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/tags?post=1580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}