{"id":1205,"date":"2024-11-23T07:11:28","date_gmt":"2024-11-23T04:11:28","guid":{"rendered":"https:\/\/aristov.tech\/blog\/?p=1205"},"modified":"2024-11-23T07:11:28","modified_gmt":"2024-11-23T04:11:28","slug":"indexes-v-postgresql","status":"publish","type":"post","link":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/","title":{"rendered":"INDEXES \u0432 PostgreSQL"},"content":{"rendered":"\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u00a0<a href=\"https:\/\/youtu.be\/nZZ-6dylHm0\">26 \u0432\u0438\u0434\u0435\u043e<\/a>\u00a0\u0438\u0437 30 \u0442\u0435\u043c\u00a0<a href=\"https:\/\/aristov.tech\/blog\/kurs-sql-c-0\/\">\u043a\u0443\u0440\u0441\u0430 SQL c 0<\/a>\u00a0\u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 <a href=\"https:\/\/rutube.ru\/video\/f3f60f0e6d134a3949ba34b2a712a335\/\">RUTUBE<\/a> \u0438 <a href=\"https:\/\/vk.com\/video-212716752_456239094\">VK \u0432\u0438\u0434\u0435\u043e<\/a>.<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u041e\u0431\u0449\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f<\/strong><\/p>\n\n\n\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u043d\u0434\u0435\u043a\u0441? \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 &#8212; \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043d\u0438\u0433\u0438.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"649\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134-1024x649.png\" alt=\"\" class=\"wp-image-1206\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134-1024x649.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134-300x190.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134-768x487.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134.png 1174w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 (\u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430). \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043a\u043d\u0438\u0433\u043e\u0439 &#8212; \u043c\u044b \u0438\u0449\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0442\u0435\u043c\u0443 \u0432 \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0438, \u0430 \u043d\u0435 \u043b\u0438\u0441\u0442\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u0434\u0440\u044f\u0434. <\/p>\n\n\n\n<p>\u0418\u043d\u0434\u0435\u043a\u0441 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u043f\u043e\u0438\u0441\u043a. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u043e\u043c.<\/p>\n\n\n\n<p>\u041f\u043b\u044e\u0441\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c (\u0432 PostgreSQL \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0434\u0435\u043a\u0441)<\/li>\n\n\n\n<li>\u0423\u0441\u043a\u043e\u0440\u044f\u044e\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 SELECT <\/li>\n\n\n\n<li>\u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f, \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f (\u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0434\u0435\u043a\u0441, \u0442\u043e \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0447\u0442\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443)<\/li>\n\n\n\n<li>\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044e<\/li>\n<\/ul>\n\n\n\n<p>\u041c\u0438\u043d\u0443\u0441\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\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 \u043c\u0435\u0441\u0442\u0430<\/li>\n\n\n\n<li>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u043f\u0440\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445 UPDATE, DELETE, INSERT (\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0430 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438)<\/li>\n\n\n\n<li>\u041f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u0441\u043b\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<\/li>\n<\/ul>\n\n\n\n<p>\u0412\u0430\u0436\u043d\u043e: \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 &#8212; \u043f\u043b\u043e\u0445\u0430\u044f \u0438\u0434\u0435\u044f:<\/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 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \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<\/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=\"has-large-font-size\"><strong>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/strong><\/p>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE &#91; UNIQUE ] INDEX &#91; CONCURRENTLY ] \n&#91; &#91; IF NOT EXISTS ] \u0438\u043c\u044f ] ON \u0438\u043c\u044f<em>\u0442\u0430\u0431\u043b\u0438\u0446\u044b <\/em>\n<em>&#91; USING \u043c\u0435\u0442\u043e\u0434 ] ( <\/em>\n<em>{ \u0438\u043c\u044f<\/em>\u0441\u0442\u043e\u043b\u0431\u0446\u0430 | ( \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 ) } \n&#91; COLLATE \u043f\u0440\u0430\u0432\u0438\u043b\u043e<em>\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 ] &#91; \u043a\u043b\u0430\u0441\u0441<\/em>\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 ] \n&#91; ASC | DESC ] &#91; NULLS { FIRST | LAST } ] &#91;, \u2026] \n)\n    &#91; INCLUDE ( \u0438\u043c\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430 &#91;,\u2026]) ] \u0434\u043b\u044f Btree \u0438 Gist\n    &#91; WITH ( \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<em>\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f = \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#91;, \u2026 ] ) ] <\/em>\n    <em>&#91; TABLESPACE \u0442\u0430\u0431\u043b<\/em>\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e ]\n    &#91; WHERE \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442 ]<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>UNIQUE - \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\nCONCURRENTLY - \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u0430\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u043d\u0435 \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 (\u043d\u0435 \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, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435)\nIF NOT EXISTS - \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\n\u0438\u043c\u044f - \u0438\u043c\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 (\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0434\u043e \u0441\u0430\u043c\u0438\u043c PostgreSQL, \u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 - \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c idx_*)\n<em>TABLESPACE<\/em> - <a href=\"https:\/\/aristov.tech\/blog\/tablichnye-prostranstva\/\">\u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<\/a>, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441<\/code><\/pre>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u0412\u0438\u0434\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/strong><\/p>\n\n\n\n<p>\u0412\u0438\u0434\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 PostgreSQL:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Btree<\/li>\n\n\n\n<li>Hash<\/li>\n\n\n\n<li>GiST<\/li>\n\n\n\n<li>SP-GiST<\/li>\n\n\n\n<li>GIN<\/li>\n\n\n\n<li>BRIN<\/li>\n<\/ul>\n\n\n\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 PostgreSQL, \u0411\u0438\u0442\u0440\u0438 (Btree) \u0438\u043b\u0438 \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 99% \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0422\u0430\u043a\u0436\u0435 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0438\u043d\u0434\u0435\u043a\u0441\u0430. <\/p>\n\n\n\n<p><strong>Btree<\/strong><\/p>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0447\u0451\u0442\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n\n\n\n<p>\u0423\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 &#8212;  \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f &gt;, &lt;, =, &gt;=, &lt;=, BETWEEN \u0438 IN, \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043f\u0443\u0441\u0442\u043e\u0442\u044b IS NULL \u0438 IS NOT NULL.<\/p>\n\n\n\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e &#8212; \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c O(log n)&nbsp; <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%92%D1%8B%D1%87%D0%B8%D1%81%D0%BB%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%81%D0%BB%D0%BE%D0%B6%D0%BD%D0%BE%D1%81%D1%82%D1%8C\">(\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c<\/a>)<\/p>\n\n\n\n<p>Btree \u0441\u0442\u0440\u043e\u0438\u0442 \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0443 (\u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d). \u0418\u043c\u0435\u043d\u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\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. \u0421\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u044d\u0442\u0430\u043f\u0430\u043c \u0432\u043d\u0438\u0437 (\u0431\u043e\u043b\u044c\u0448\u0435 14 \u0438\u0434\u0435\u043c \u0432\u043f\u0440\u0430\u0432\u043e, \u043e\u0442 32 \u0434\u043e 44 \u0438\u0434\u0435\u043c \u0432 3 \u043b\u0438\u0441\u0442) \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u043f\u043e \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u0441\u0442\u0440\u0435\u043b\u043a\u0435) \u0432 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u0415\u0441\u043b\u0438 \u0431\u044b \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e &#8212; \u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u0431\u044b \u043d\u0430\u0448\u043b\u0438 \u0438\u0441\u043a\u043e\u043c\u0443\u044e \u044f\u0447\u0435\u0439\u043a\u0443.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-140-1024x576.png\" alt=\"\" class=\"wp-image-1212\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-140-1024x576.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-140-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-140-768x432.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-140-1536x864.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-140.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u041d\u0430 \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 (\u043d\u0430 \u043b\u0438\u0441\u0442\u044c\u044f\u0445) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435.<\/p>\n\n\n\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Btree+ (\u0438\u043b\u0438 B+tree \u0434\u0435\u0440\u0435\u0432\u043e). \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Btree, \u0435\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043b\u0438\u0441\u0442\u044c\u044f\u043c\u0438, \u0447\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 13 \u0432\u0435\u0440\u0441\u0438\u0438 Postgresql \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c <a href=\"https:\/\/www.cybertec-postgresql.com\/en\/b-tree-index-deduplication\/\">\u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u044f<\/a>, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 Btree \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0441\u0438\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438\/\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u0435\u0440\u0435\u0432\u0430, \u0442\u043e \u044d\u0442\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f 90% (\u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u0435 \u044f\u0447\u0435\u0439\u043a\u0438)<\/li>\n\n\n\n<li>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b (\u043e\u043d\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0443\u0442 \u0432 \u043e\u0431\u044a\u0435\u043c\u0435, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438)<\/li>\n\n\n\n<li>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0447\u0438\u0441\u043b\u0430, \u0434\u0430\u0442\u044b, \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0435)<\/li>\n\n\n\n<li>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0438\u0449\u0435\u043c \u043f\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0443 (like) \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 (%\u0410\u0411\u0412).<\/li>\n\n\n\n<li><\/li>\n<\/ul>\n\n\n\n<p><strong>\u0425\u044d\u0448-\u0438\u043d\u0434\u0435\u043a\u0441<\/strong><strong> (hash)<\/strong><\/p>\n\n\n\n<p>\u0412 \u0442\u0435\u043e\u0440\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Btree.<\/p>\n\n\n\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430 (=). \u0412 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 IS NULL \u0438 IS NOT NULL \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n\n\n\n<p>Hash \u0438\u043d\u0434\u0435\u043a\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u043a\u043e\u0440\u0437\u0438\u043d\u0430\u0445 (bucket), \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435. \u041a\u043e\u0440\u0437\u0438\u043d\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b &#8212; \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043d\u0438\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-136-1024x576.png\" alt=\"\" class=\"wp-image-1208\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-136-1024x576.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-136-300x169.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-136-768x432.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-136-1536x864.png 1536w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-136.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043f\u0443\u0441\u043a \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443 \u0438 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u043d\u0435\u0439.<\/p>\n\n\n\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043d\u0438\u0436\u0435, \u0447\u0435\u043c \u0443 Btree. \u041f\u043e \u0441\u0443\u0442\u0438, \u043e\u043d \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043e\u0434\u043d\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>GIN  <\/strong><\/p>\n\n\n\n<p>GIN (Generalized Inverted Index) &#8212; \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0439 \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043a \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c \u0442\u0438\u043f\u0430\u043c, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0439: \u043c\u0430\u0441\u0441\u0438\u0432\u044b, jsonb.<\/p>\n\n\n\n<p>\u041f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c\u0438, \u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0449\u0443\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u044d\u0442\u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>GiST  <\/strong><\/p>\n\n\n\n<p>GiST (Generalized Search Tree) &#8212; \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e.<\/p>\n\n\n\n<p>\u0411\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0433\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0445\u0435\u043c\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u043e\u0434 \u0442\u0438\u043f \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u043b\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0431\u043e\u0440 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u0430 \u043f\u043e\u043b\u044f.<\/p>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445: \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f, \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430, \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0441\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 tsvector \u0438\u043b\u0438 tsquery.<\/p>\n\n\n\n<p>\u0421\u0430\u043c\u044b\u0439 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 GIN &amp; GiST &#8212; \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 Google\/Yandex. \u041e\u043d\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u044b \u0441 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"871\" height=\"579\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-138.png\" alt=\"\" class=\"wp-image-1210\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-138.png 871w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-138-300x199.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-138-768x511.png 768w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>SP-GiST <\/strong><\/p>\n\n\n\n<p><strong>SP-GiST<\/strong> (Space-Partitioned GiST) &#8212; GiST \u0441 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430.<\/p>\n\n\n\n<p>\u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043d\u0435\u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0434\u0435\u0440\u0435\u0432\u044c\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u043d\u0442\u043e\u0432, k-\u043c\u0435\u0440\u043d\u044b\u0435 \u0438 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0435 \u0434\u0435\u0440\u0435\u0432\u044c\u044f).<\/p>\n\n\n\n<p>\u041a\u0430\u043a \u0438 GiST, SP-GiST \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>BRIN<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.crunchydata.com\/blog\/postgres-indexing-when-does-brin-win\">BRIN<\/a> (block range index) &#8212; \u0431\u043b\u043e\u043a\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0441 11 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n\n\n\n<p>\u041f\u043e\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043d\u043e \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. <a href=\"https:\/\/habr.com\/ru\/company\/postgrespro\/blog\/346460\/\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 BRIN.<\/a><\/p>\n\n\n\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, BRIN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0445. \u042d\u0442\u043e <strong><em>\u043d\u0435\u0442\u043e\u0447\u043d\u044b\u0439<\/em> <\/strong>\u0438\u043d\u0434\u0435\u043a\u0441 &#8212; \u043e\u043d \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 TID-\u043e\u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a.<\/p>\n\n\n\n<p>\u041d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432, \u0433\u0434\u0435 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. <\/p>\n\n\n\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, GPS \u0442\u0440\u0435\u043a\u0438\u043d\u0433\u0430, IoT.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u0422\u0438\u043f\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432<\/strong><\/p>\n\n\n\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0432\u0438\u0434\u043e\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0435\u0449\u0451 \u0438 \u0442\u0438\u043f\u044b (\u0432 \u043a\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441)<\/p>\n\n\n\n<p>\u0422\u0438\u043f\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432:<\/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 (\u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u043e\u043b\u044f\u043c \u0441\u0440\u0430\u0437\u0443 &#8212; \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e, \u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043b\u0438\u0441\u0442\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0435\u0440\u0435\u0432\u043e \u043f\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u043b\u044e)<\/li>\n\n\n\n<li>\u041f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 (\u043d\u0430 \u043d\u0438\u0436\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u0438 \u0441\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435)<\/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 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0434\u0430\u043d\u043d\u044b\u0445).<\/li>\n\n\n\n<li><\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size\"><strong>Explain<\/strong><\/p>\n\n\n\n<p>EXPLAIN \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043b\u044f \u0435\u0433\u043e \u043e\u0446\u0435\u043d\u043a\u0438.<\/p>\n\n\n\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-explain.html\">EXPLAIN<\/a> &#91; ( \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#91;, \u2026] ) ] \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\n\n\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:\nANALYZE &#91; boolean ]\nVERBOSE &#91; boolean ]\nCOSTS &#91; boolean ]\nSETTINGS &#91; boolean ]\nBUFFERS &#91; boolean ]\nWAL &#91; boolean ]\nTIMING &#91; boolean ]\nSUMMARY &#91; boolean ]\nFORMAT { TEXT | XML | JSON | YAML }<\/code><\/pre>\n\n\n\n<p>\u041f\u0440\u0438 EXPLAIN \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c ANALYZE, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0435\u0449\u0451 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f (ANALYZE \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f). <\/p>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e EXPLAIN \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439.<\/p>\n\n\n\n<p><a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/574702\/\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u0430\u043f\u0430\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/explain.tensor.ru\/\">\u0421\u0435\u0440\u0432\u0438\u0441<\/a> \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \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=\"536\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-148-1024x536.png\" alt=\"\" class=\"wp-image-1220\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-148-1024x536.png 1024w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-148-300x157.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-148-768x402.png 768w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-148.png 1364w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/habr.com\/ru\/articles\/279255\/\">EXPLAIN \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/habr.com\/ru\/articles\/560834\/\">\u041a\u0430\u043a \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0421\u0423\u0411\u0414 \u0434\u0435\u043b\u0430\u0435\u0442 JOIN?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/696680\/\">Queries in PostgreSQL. Sort and merge<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/412605\/\">\u0418\u0441\u0442\u043e\u0440\u0438\u044f Merge<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/habr.com\/ru\/companies\/postgrespro\/articles\/683020\/\">Queries in PostgreSQL. Hashing<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/using-explain.html\">Using EXPLAIN<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/runtime-config-query.html#RUNTIME-CONFIG-QUERY-CONSTANTS\">Query Planning<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/ossc-db\/pg_hint_plan\">\u041a\u0430\u043a \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430<\/strong><\/p>\n\n\n\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 generate_series.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE testindex (\n    a int,\n    b int\n);<\/code><\/pre>\n\n\n\n<p>\u0418 \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO testindex \n    SELECT i, i*2\n    FROM generate_series(1,100000) s(i);<\/code><\/pre>\n\n\n\n<p>\u0412\u044b\u0432\u0435\u0434\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 10 \u0441\u0442\u0440\u043e\u043a:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM testindex LIMIT 10;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"204\" height=\"289\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-141.png\" alt=\"\" class=\"wp-image-1213\"\/><\/figure>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438:<\/p>\n\n\n\n<p>CREATE TABLE test AS<br>SELECT generate_series AS id<br>    , generate_series::text || (random() * 10)::text AS col2<br>    , (array[&#8216;Da&#8217;, &#8216;Net&#8217;, &#8216;Ne znayu&#8217;])[floor(random() * 3 + 1)] AS is_okay<br>FROM generate_series(1, 20000);<\/p>\n\n\n\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 20000 \u0441\u0442\u0440\u043e\u043a \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"419\" height=\"762\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-142.png\" alt=\"\" class=\"wp-image-1214\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-142.png 419w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-142-165x300.png 165w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/figure>\n\n\n\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * \nFROM test \nWHERE id = 1;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"410\" height=\"92\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-143.png\" alt=\"\" class=\"wp-image-1215\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-143.png 410w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-143-300x67.png 300w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><\/figure>\n\n\n\n<p>C \u043f\u043e\u043c\u043e\u0449\u044c\u044e EXPLAIN \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN\nSELECT * \nFROM test \nWHERE id = 1;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"115\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-144.png\" alt=\"\" class=\"wp-image-1216\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-144.png 567w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-144-300x61.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><\/figure>\n\n\n\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u043f\u043e\u043b\u044f id:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE INDEX idx_test_id \n    ON test(id);<\/code><\/pre>\n\n\n\n<p>\u0418 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430\u043d\u043e\u0432\u043e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN\nSELECT * \nFROM test \nWHERE id = 1;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"134\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-145.png\" alt=\"\" class=\"wp-image-1217\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-145.png 647w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-145-300x62.png 300w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/figure>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0432 \u0440\u0430\u0437\u044b.<\/p>\n\n\n\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430\u0448 \u0438\u043d\u0434\u0435\u043a\u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER TABLE test \n    ADD CONSTRAINT uk_test_id UNIQUE(id);<\/code><\/pre>\n\n\n\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 &#8212; \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE UNIQUE INDEX idx_test_id \n    ON test(id);<\/code><\/pre>\n\n\n\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e NULL!=NULL, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 id \u0440\u0430\u0432\u043d\u044b\u043c NULL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO test VALUES \n    (null, 12, 'First');\nINSERT INTO test VALUES \n    (null, 12, 'SEcond');<\/code><\/pre>\n\n\n\n<p>\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * \nFROM test \nWHERE id IS NULL;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"351\" height=\"116\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-146.png\" alt=\"\" class=\"wp-image-1218\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-146.png 351w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-146-300x99.png 300w\" sizes=\"auto, (max-width: 351px) 100vw, 351px\" \/><\/figure>\n\n\n\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043d\u0434\u0435\u043a\u0441 \u0431\u044b\u043b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 NOT NULL (\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f PRIMARY KEY).<\/p>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0437\u0430\u043d\u043e\u0432\u043e \u0441 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE test AS\nSELECT generate_series AS id\n    , generate_series::text || (random() * 10)::text AS col2\n    , (array&#91;'Apple', 'Banana', 'Pinaapple'])&#91;floor(random() * 3 + 1)] AS fruit\nFROM generate_series(1, 100000);\n\nCREATE INDEX idx_test_id_is_okay \n    ON test(id, fruit);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"426\" height=\"474\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-147.png\" alt=\"\" class=\"wp-image-1219\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-147.png 426w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-147-270x300.png 270w\" sizes=\"auto, (max-width: 426px) 100vw, 426px\" \/><\/figure>\n\n\n\n<p>\u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u043e\u043b\u044f\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN\nSELECT * \nFROM test \nWHERE id = 1 AND fruit = 'Banana';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"609\" height=\"153\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-149.png\" alt=\"\" class=\"wp-image-1221\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-149.png 609w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-149-300x75.png 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/figure>\n\n\n\n<p>\u041c\u044b \u0441\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0441\u044f \u0434\u043e \u043b\u0438\u0441\u0442\u0430 \u0434\u0435\u0440\u0435\u0432\u0430, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u0438\u0441\u0442\u0430 \u0441\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u0441\u044f \u043f\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c\u0443 \u0434\u0435\u0440\u0435\u0432\u0443 (\u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u044f).<\/p>\n\n\n\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN\nSELECT * \nFROM test \nWHERE id = 1;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"108\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-150.png\" alt=\"\" class=\"wp-image-1222\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-150.png 618w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-150-300x52.png 300w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/figure>\n\n\n\n<p>\u0410 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u043b\u044f \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN ANALYZE\nSELECT * \nFROM test \nWHERE fruit = 'Banana';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"180\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-151.png\" alt=\"\" class=\"wp-image-1223\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-151.png 600w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-151-300x90.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SET enable_seqscan=off;<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0442\u043e\u0442 \u0436\u0435 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN ANALYZE\nSELECT * \nFROM test \nWHERE fruit = 'Banana';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"227\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-152.png\" alt=\"\" class=\"wp-image-1224\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-152.png 976w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-152-300x70.png 300w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-152-768x179.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/figure>\n\n\n\n<p>\u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u0437\u0430\u043d\u044f\u043b\u043e \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 (\u043f\u043e\u044d\u0442\u043e\u043c\u0443 PostgreSQL \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435).<\/p>\n\n\n\n<p>\u0415\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 random_page_cost, \u0447\u0442\u043e\u0431\u044b PostgreSQL \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0435\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u043b \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0434\u0438\u0441\u043a\u0443 \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0440\u0435\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n\n\n\n<p>SET random_page_cost=1.1;<\/p>\n\n\n\n<p>\u0418\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u043e\u043b\u044f\u043c \u0432 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438.<\/p>\n\n\n\n<p>\u041e\u0431\u0430 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN \nSELECT * \nFROM test \nORDER BY id, fruit;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"659\" height=\"97\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-153.png\" alt=\"\" class=\"wp-image-1225\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-153.png 659w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-153-300x44.png 300w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/figure>\n\n\n\n<p>\u041e\u0431\u0430 \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN \nSELECT * \nFROM test \nORDER BY id DESC, fruit DESC;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"658\" height=\"96\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-154.png\" alt=\"\" class=\"wp-image-1226\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-154.png 658w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-154-300x44.png 300w\" sizes=\"auto, (max-width: 658px) 100vw, 658px\" \/><\/figure>\n\n\n\n<p>\u0412 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (\u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN \nSELECT * \nFROM test \nORDER BY id, fruit DESC;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"522\" height=\"133\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-157.png\" alt=\"\" class=\"wp-image-1229\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-157.png 522w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-157-300x76.png 300w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/figure>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441. \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441:<\/p>\n\n\n\n<p>CREATE INDEX idx_test_id_is_okay <br>    ON test(id) INCLUDE (fruit);<\/p>\n\n\n\n<p>\u041f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043d\u0435\u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0440\u044f\u0434\u043e\u043c \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN \nSELECT * \nFROM test \nORDER BY id DESC, fruit DESC;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"632\" height=\"154\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-156.png\" alt=\"\" class=\"wp-image-1228\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-156.png 632w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-156-300x73.png 300w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/figure>\n\n\n\n<p>\u041d\u043e \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u0442\u0431\u043e\u0440\u0435 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN\nSELECT * \nFROM test \nWHERE id = 1 AND fruit = 'Banana';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"127\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-158.png\" alt=\"\" class=\"wp-image-1230\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-158.png 595w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-158-300x64.png 300w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/figure>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0437\u0430\u043d\u043e\u0432\u043e \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE test AS\nSELECT generate_series AS id\n    , generate_series::text || (random() * 10)::text AS col2\n    , (array&#91;'BaNaNa', 'Mushroom', 'Coconut'])&#91;floor(random() * 3 + 1)] AS fruit\nFROM generate_series(1, 50000);\n\nCREATE INDEX idx_test_id_is_okay \n    ON test(lower(fruit));<\/code><\/pre>\n\n\n\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u0438\u0441\u043a:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN\nSELECT * \nFROM test \nWHERE lower(fruit) = 'banana';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"165\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-159.png\" alt=\"\" class=\"wp-image-1231\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-159.png 647w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-159-300x77.png 300w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/figure>\n\n\n\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0432 \u0441\u0430\u043c\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435.<\/p>\n\n\n\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0431\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN\nSELECT * \nFROM test \nWHERE fruit = 'banana';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"137\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-160.png\" alt=\"\" class=\"wp-image-1232\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-160.png 641w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-160-300x64.png 300w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><\/figure>\n\n\n\n<p>\u0418 \u0442\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"113\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-161.png\" alt=\"\" class=\"wp-image-1233\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-161.png 320w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-161-300x106.png 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE test AS\nSELECT generate_series AS id\n    , generate_series::text || (random() * 10)::text AS col2\n    , (array&#91;'Oops', 'Bad', 'False'])&#91;floor(random() * 3 + 1)] AS bad\nFROM generate_series(1, 500000);\n\nCREATE INDEX idx_test_id_100 \n    ON test(id) WHERE id &lt; 100;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"419\" height=\"502\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-162.png\" alt=\"\" class=\"wp-image-1234\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-162.png 419w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-162-250x300.png 250w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/figure>\n\n\n\n<p>\u0422\u0430\u043a\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u0436\u0435\u043d, \u0435\u0441\u043b\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u0445. \u041f\u0435\u0440\u0432\u044b\u0435 100 \u0447\u0435\u043b\u043e\u0432\u0435\u043a &#8212; \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 &#8212; \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441.<\/p>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0435 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044e, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN\nSELECT * \nFROM test \nWHERE bad = 'Oops;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"132\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-163.png\" alt=\"\" class=\"wp-image-1235\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-163.png 486w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-163-300x81.png 300w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/figure>\n\n\n\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0438\u0437\u0432\u043d\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN ANALYZE\nSELECT * \nFROM test \nWHERE id = 100;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"259\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-164.png\" alt=\"\" class=\"wp-image-1236\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-164.png 558w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-164-300x139.png 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/figure>\n\n\n\n<p>\u041f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e id \u0438\u0437 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u044b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>EXPLAIN ANALYZE\nSELECT * \nFROM test \nWHERE id = 99;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"166\" src=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-165.png\" alt=\"\" class=\"wp-image-1237\" srcset=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-165.png 501w, https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-165-300x99.png 300w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/figure>\n\n\n\n<p>\u0422\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e.<\/p>\n\n\n\n<p>\u041f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f&nbsp;\u043a \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/github.com\/aeuge\/aristov_tech\/blob\/main\/00%20SQL%20s%200\/presentation\/00%2026%20SQL%20c%200.pdf\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n\n\n\n<p>27 \u0438\u0437 30 \u0442\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u0440\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u2013 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043a \u043e\u043d\u043b\u0430\u0439\u043d \u0433\u0440\u0443\u043f\u043f\u0435, \u0441\u0441\u044b\u043b\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432&nbsp;<a href=\"https:\/\/aristov.tech\/blog\/kurs-sql-c-0\/\">\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u0443\u0440\u0441\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\u00a026 \u0432\u0438\u0434\u0435\u043e\u00a0\u0438\u0437 30 \u0442\u0435\u043c\u00a0\u043a\u0443\u0440\u0441\u0430 SQL c 0\u00a0\u043e\u0442 \u0410\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0415\u0432\u0433\u0435\u043d\u0438\u044f. \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 RUTUBE \u0438 VK \u0432\u0438\u0434\u0435\u043e. \u041e\u0431\u0449\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u043d\u0434\u0435\u043a\u0441? \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 &#8212; \u043e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043d\u0438\u0433\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 (\u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0430). \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043a\u043d\u0438\u0433\u043e\u0439 &#8212; \u043c\u044b \u0438\u0449\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204,194],"tags":[315,310,314,312,311,317,16,313,316],"class_list":["post-1205","post","type-post","status-publish","format-standard","hentry","category-kurs-sql-s-0","category-obuchenie-postgresql","tag-brin","tag-btree","tag-gin","tag-gist","tag-hash","tag-indexes","tag-postgresql","tag-sp-gist","tag-indeksy"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>INDEXES \u0432 PostgreSQL - \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\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0438\u0434\u044b (Btree, Hash, GiST, SP-GiST, GIN, BRIN) \u0438 \u0442\u0438\u043f\u044b (\u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439, \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439) \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 PostgreSQL.\" \/>\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\/indexes-v-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"INDEXES \u0432 PostgreSQL - \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\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0438\u0434\u044b (Btree, Hash, GiST, SP-GiST, GIN, BRIN) \u0438 \u0442\u0438\u043f\u044b (\u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439, \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439) \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 PostgreSQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/\" \/>\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=\"2024-11-23T04:11:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1174\" \/>\n\t<meta property=\"og:image:height\" content=\"744\" \/>\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=\"13 \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\\\/indexes-v-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/\"},\"author\":{\"name\":\"Maria\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/6a152749a3dde76f19cc30db676d2310\"},\"headline\":\"INDEXES \u0432 PostgreSQL\",\"datePublished\":\"2024-11-23T04:11:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/\"},\"wordCount\":1414,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/#\\\/schema\\\/person\\\/05f3a04bf720ae4bf25ac99c4248d5e7\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-134-1024x649.png\",\"keywords\":[\"brin\",\"btree\",\"gin\",\"gist\",\"hash\",\"indexes\",\"postgresql\",\"sp-gist\",\"\u0438\u043d\u0434\u0435\u043a\u0441\u044b\"],\"articleSection\":[\"\u041a\u0443\u0440\u0441 SQL \u0441 0\",\"\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 PostgreSQL\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/\",\"name\":\"INDEXES \u0432 PostgreSQL - \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\\\/indexes-v-postgresql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-134-1024x649.png\",\"datePublished\":\"2024-11-23T04:11:28+00:00\",\"description\":\"\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0438\u0434\u044b (Btree, Hash, GiST, SP-GiST, GIN, BRIN) \u0438 \u0442\u0438\u043f\u044b (\u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439, \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439) \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 PostgreSQL.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-134.png\",\"contentUrl\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-134.png\",\"width\":1174,\"height\":744},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/aristov.tech\\\/blog\\\/indexes-v-postgresql\\\/#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\":\"INDEXES \u0432 PostgreSQL\"}]},{\"@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":"INDEXES \u0432 PostgreSQL - \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\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0438\u0434\u044b (Btree, Hash, GiST, SP-GiST, GIN, BRIN) \u0438 \u0442\u0438\u043f\u044b (\u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439, \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439) \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 PostgreSQL.","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\/indexes-v-postgresql\/","og_locale":"ru_RU","og_type":"article","og_title":"INDEXES \u0432 PostgreSQL - \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\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0438\u0434\u044b (Btree, Hash, GiST, SP-GiST, GIN, BRIN) \u0438 \u0442\u0438\u043f\u044b (\u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439, \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439) \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 PostgreSQL.","og_url":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/","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":"2024-11-23T04:11:28+00:00","og_image":[{"width":1174,"height":744,"url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134.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":"13 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/#article","isPartOf":{"@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/"},"author":{"name":"Maria","@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/6a152749a3dde76f19cc30db676d2310"},"headline":"INDEXES \u0432 PostgreSQL","datePublished":"2024-11-23T04:11:28+00:00","mainEntityOfPage":{"@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/"},"wordCount":1414,"commentCount":0,"publisher":{"@id":"https:\/\/aristov.tech\/blog\/#\/schema\/person\/05f3a04bf720ae4bf25ac99c4248d5e7"},"image":{"@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134-1024x649.png","keywords":["brin","btree","gin","gist","hash","indexes","postgresql","sp-gist","\u0438\u043d\u0434\u0435\u043a\u0441\u044b"],"articleSection":["\u041a\u0443\u0440\u0441 SQL \u0441 0","\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 PostgreSQL"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/","url":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/","name":"INDEXES \u0432 PostgreSQL - \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\/indexes-v-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134-1024x649.png","datePublished":"2024-11-23T04:11:28+00:00","description":"\u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0438\u0434\u044b (Btree, Hash, GiST, SP-GiST, GIN, BRIN) \u0438 \u0442\u0438\u043f\u044b (\u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439, \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0439, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439) \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u0432 PostgreSQL.","breadcrumb":{"@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/#primaryimage","url":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134.png","contentUrl":"https:\/\/aristov.tech\/blog\/wp-content\/uploads\/2024\/07\/image-134.png","width":1174,"height":744},{"@type":"BreadcrumbList","@id":"https:\/\/aristov.tech\/blog\/indexes-v-postgresql\/#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":"INDEXES \u0432 PostgreSQL"}]},{"@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\/1205","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=1205"}],"version-history":[{"count":4,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/1205\/revisions"}],"predecessor-version":[{"id":1403,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/posts\/1205\/revisions\/1403"}],"wp:attachment":[{"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/media?parent=1205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/categories?post=1205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aristov.tech\/blog\/wp-json\/wp\/v2\/tags?post=1205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}