{"id":6064,"date":"2026-09-11T07:00:00","date_gmt":"2026-09-11T04:00:00","guid":{"rendered":"https:\/\/www.dataplatform.gr\/?p=6064"},"modified":"2026-09-11T11:11:52","modified_gmt":"2026-09-11T08:11:52","slug":"pos-vriskoyme-ta-missing-indexes-se-postgresql","status":"publish","type":"post","link":"https:\/\/www.dataplatform.gr\/en\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/","title":{"rendered":"How to find Missing Indexes in PostgreSQL"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Those of us who come from the world of <strong>SQL Server<\/strong>, we are used to our favorites <strong>Missing Index DMVs<\/strong> (<code>sys.dm_db_missing_index_details<\/code>, <code>sys.dm_db_missing_index_group_stats<\/code>), which give us the ready-made <code>CREATE INDEX<\/code> command along with Avg User Impact and Equality\/Inequality\/Include columns.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In <strong>PostgreSQL<\/strong>, the default installation does not offer this information out of the box. However, by combining two powerful extensions, the <strong><code>pg_qualstats<\/code><\/strong> (which records the <code>WHERE<\/code> \/ <code>JOIN<\/code> clauses) and the <strong><code>pg_stat_statements<\/code><\/strong> (which records the SQL text), we can create a very useful query that <strong>suggests Indexes and generates DDL<\/strong> of it dynamically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This Query:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Locates<\/strong> the filtering fields (<code>WHERE<\/code> \/ <code>JOIN<\/code>).<\/li>\n\n\n\n<li><strong>Automatically suggests Covering Indexes<\/strong> placing the remaining fields of <code>SELECT<\/code> in the <strong><code>INCLUDE<\/code><\/strong>.<\/li>\n\n\n\n<li><strong>Excludes duplicate fields<\/strong> (does not put in <code>INCLUDE<\/code> fields that already exist in <code>WHERE<\/code>).<\/li>\n\n\n\n<li><strong>Calculates the Impact Score<\/strong>.<\/li>\n\n\n\n<li><strong>Checks the size of the table in GB<\/strong> and puts <strong><code>\ud83d\udd25 HIGH<\/code> Priority<\/strong> <strong>only<\/strong> when the table is &gt;= 1GB and the Impact Score is high.<\/li>\n\n\n\n<li><strong>Excludes tables that already have an Index<\/strong> in the same fields (<code>WHERE DOES NOT EXIST<\/code>).<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For the script to work, two extensions are required:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>pg_stat_statements<\/strong>: Records the queries executed in the database.<\/li>\n\n\n\n<li><strong>pg_qualstats<\/strong>: Records the <code>WHERE<\/code>, <code>JOIN<\/code> and <code>HAVING<\/code> clauses, offering the necessary metrics (executions, filtered rows).<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">In the example we will setup on RHEL Unix with PostgreSQL version 11:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">sudo yum install -y pg_qualstats11 --nogpgcheck -y\nsudo yum install -y postgresql11-contrib --nogpgcheck -y<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Because in the example we have included a version that is now out of support, we can also do a manual setup:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">curl -O https:\/\/yum-archive.postgresql.org\/11\/redhat\/rhel-7-x86_64\/pg_qualstats11-2.0.2-1.rhel7.x86_64.rpm\ncurl -O https:\/\/yum-archive.postgresql.org\/11\/redhat\/rhel-7-x86_64\/postgresql11-libs-11.9-1PGDG.rhel7.x86_64.rpm\ncurl -O https:\/\/yum-archive.postgresql.org\/11\/redhat\/rhel-7-x86_64\/postgresql11-contrib-11.9-1PGDG.rhel7.x86_64.rpm\n\nsudo yum localinstall -y pg_qualstats11-2.0.2-1.rhel7.x86_64.rpm\nsudo yum localinstall -y postgresql11-libs-11.9-1PGDG.rhel7.x86_64.rpm postgresql11-contrib-11.9-1PGDG.rhel7.x86_64.rpm<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next we need to declare the extentions in <code>postgresql.conf<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">su postgres\nvi $PGDATA\/postgresql.conf<\/pre>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>shared_preload_libraries = 'pg_stat_statements, pg_qualstats'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then we need to restart the service:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">sudo systemctl restart postgresql-11<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After PostgreSQL is up, we connect and enable the extensions:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">sudo -u postgres psql -d db_test\n\nCREATE EXTENSION IF NOT EXISTS pg_stat_statements;\n\nCREATE EXTENSION IF NOT EXISTS pg_qualstats;\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To see that they have been activated, run the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">SHOW shared_preload_libraries;\nSHOW pg_qualstats.enabled;\nSHOW pg_qualstats.sample_rate;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the version, the default <code>sample_rate <\/code>is 0.01 so if we want to run something manually from the same session and have it record it, we definitely run it from the query session where we will run the query below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">SET pg_qualstats.sample_rate = 1;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If we want to reset the statistics, we run the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\">SELECT pg_qualstats_reset();<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The query:<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\" data-no-translation=\"\" data-no-auto-translation=\"\"> \nWITH qual_details AS (\n    SELECT \n        q.queryid,\n        q.qualid,\n        q.lrelid::regclass::text AS table_name,\n        q.lrelid AS table_oid,\n        a.attname AS filter_column,\n        q.occurences,\n        q.nbfiltered\n    FROM pg_qualstats q\n    JOIN pg_attribute a ON a.attrelid = q.lrelid AND a.attnum = q.lattnum\n    WHERE q.lrelid IS NOT NULL AND q.lrelid > 0\n),\nwhere_columns_per_qual AS (\n    SELECT \n        qualid,\n        table_name,\n        table_oid,\n        array_agg(DISTINCT filter_column) AS all_where_cols\n    FROM qual_details\n    GROUP BY qualid, table_name, table_oid\n),\nquery_payload AS (\n    SELECT \n        qd.qualid,\n        qd.table_name,\n        qd.table_oid,\n        qd.filter_column,\n        qd.occurences,\n        qd.nbfiltered,\n        ARRAY(\n            SELECT DISTINCT a_select.attname\n            FROM pg_stat_statements pss\n            JOIN pg_attribute a_select ON a_select.attrelid = (qd.table_name::regclass)\n            JOIN where_columns_per_qual w ON w.qualid = qd.qualid\n            WHERE pss.queryid = qd.queryid\n              AND a_select.attnum > 0 \n              AND NOT a_select.attisdropped\n              AND NOT (a_select.attname = ANY(w.all_where_cols))\n              AND pss.query ILIKE '%' || a_select.attname || '%'\n        ) AS payload_columns\n    FROM qual_details qd\n),\ndedup_where AS (\n    SELECT DISTINCT\n        qualid,\n        table_name,\n        table_oid,\n        filter_column,\n        occurences,\n        nbfiltered\n    FROM query_payload\n),\npayload_flattened AS (\n    SELECT DISTINCT\n        qualid,\n        unnest(payload_columns) AS inc_col\n    FROM query_payload\n),\ninclude_aggregated AS (\n    SELECT \n        qualid,\n        string_agg(quote_ident(inc_col), ', ' ORDER BY quote_ident(inc_col)) AS include_list\n    FROM payload_flattened\n    GROUP BY qualid\n),\ncalculated_metrics AS (\n    SELECT \n        dw.qualid,\n        dw.table_name,\n        dw.table_oid,\n        string_agg(dw.filter_column, ', ' ORDER BY dw.filter_column) AS where_columns,\n        COALESCE(inc.include_list, '\u2014') AS include_columns,\n        MAX(dw.occurences) AS execution_count,\n        MAX(dw.nbfiltered) AS total_rows_filtered,\n        ROUND((pg_relation_size(dw.table_oid)::numeric \/ 1073741824.0), 2) AS table_size_gb,\n        (MAX(dw.occurences) * MAX(dw.nbfiltered)) AS impact_score,\n        \n        FORMAT(\n            'CREATE INDEX CONCURRENTLY idx_%s_%s%s ON %s (%s)%s;',\n            dw.table_name,\n            string_agg(dw.filter_column, '_' ORDER BY dw.filter_column),\n            CASE WHEN inc.include_list IS NOT NULL THEN '_covering' ELSE '' END,\n            dw.table_name,\n            string_agg(quote_ident(dw.filter_column), ', ' ORDER BY quote_ident(dw.filter_column)),\n            CASE \n                WHEN inc.include_list IS NOT NULL AND inc.include_list != ''\n                THEN ' INCLUDE (' || inc.include_list || ')'\n                ELSE ''\n            END\n        ) AS create_smart_index_command\n    FROM dedup_where dw\n    LEFT JOIN include_aggregated inc ON inc.qualid = dw.qualid\n    GROUP BY dw.qualid, dw.table_name, dw.table_oid, inc.include_list\n)\nSELECT \n    cm.table_name,\n    cm.where_columns,\n    cm.include_columns,\n    cm.execution_count,\n    cm.total_rows_filtered,\n    cm.table_size_gb,\n    cm.impact_score,\n    CASE \n        WHEN cm.impact_score > 100000 AND cm.table_size_gb >= 1.00 THEN '\ud83d\udd25 HIGH'\n        WHEN cm.impact_score BETWEEN 1000 AND 100000 THEN '\u26a0\ufe0f MEDIUM'\n        ELSE '\u2139\ufe0f LOW'\n    END AS priority,\n    cm.create_smart_index_command\nFROM calculated_metrics cm\n-- \u0395\u039e\u0391\u0399\u03a1\u0395\u03a3\u0397: \u039c\u03b7\u03bd \u03c0\u03c1\u03bf\u03c4\u03b5\u03af\u03bd\u03b5\u03b9\u03c2 \u03b1\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9 \u03ae\u03b4\u03b7 Index\nWHERE NOT EXISTS (\n    SELECT 1 \n    FROM pg_index i\n    JOIN pg_class c ON c.oid = i.indrelid\n    WHERE c.oid = cm.table_oid\n      AND i.indkey[0] IN (\n          SELECT attnum \n          FROM pg_attribute \n          WHERE attrelid = cm.table_oid \n            AND attname = ANY(string_to_array(cm.where_columns, ', '))\n      )\n)\nORDER BY cm.impact_score DESC, cm.execution_count DESC;<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"452\" src=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2026\/07\/pgmi-01-1024x452.png\" alt=\"\" class=\"wp-image-6065\" srcset=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2026\/07\/pgmi-01-1024x452.png 1024w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2026\/07\/pgmi-01-300x132.png 300w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2026\/07\/pgmi-01-768x339.png 768w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2026\/07\/pgmi-01-18x8.png 18w, https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2026\/07\/pgmi-01.png 1256w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sources:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/\" data-type=\"link\" data-id=\"https:\/\/www.postgresql.org\/docs\/current\/\">PostgreSQL 18.4 Documentation<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>Those of us who come from the world of SQL Server are used to our favorite Missing Index DMVs (sys.dm_db_missing_index_details, sys.dm_db_missing_index_group_stats), which give us the CREATE INDEX command along with Avg User Impact and Equality\/Inequality\/Include columns. In PostgreSQL, the default installation does not offer this information out of the box. However, by combining two powerful extensions, pg_qualstats [\u2026]<\/p>","protected":false},"author":1,"featured_media":2376,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,123],"tags":[29,48,124,30],"class_list":["post-6064","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-databases","category-postgresql","tag-databases","tag-performance_tuning","tag-postgresql","tag-rdbms"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL - DataPlatform.gr<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dataplatform.gr\/en\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL - DataPlatform.gr\" \/>\n<meta property=\"og:description\" content=\"\u038c\u03c3\u03bf\u03b9 \u03c0\u03c1\u03bf\u03b5\u03c1\u03c7\u03cc\u03bc\u03b1\u03c3\u03c4\u03b5 \u03b1\u03c0\u03cc \u03c4\u03bf\u03bd \u03ba\u03cc\u03c3\u03bc\u03bf \u03c4\u03bf\u03c5 SQL Server, \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c3\u03c5\u03bd\u03b7\u03b8\u03af\u03c3\u03b5\u03b9 \u03c3\u03c4\u03b1 \u03b1\u03b3\u03b1\u03c0\u03b7\u03bc\u03ad\u03bd\u03b1 \u03bc\u03b1\u03c2 Missing Index DMVs (sys.dm_db_missing_index_details, sys.dm_db_missing_index_group_stats), \u03c4\u03b1 \u03bf\u03c0\u03bf\u03af\u03b1 \u03bc\u03b1\u03c2 \u03b4\u03af\u03bd\u03bf\u03c5\u03bd \u03ad\u03c4\u03bf\u03b9\u03bc\u03bf \u03c4\u03bf CREATE INDEX command \u03bc\u03b1\u03b6\u03af \u03bc\u03b5 \u03c4\u03bf Avg User Impact \u03ba\u03b1\u03b9 \u03c4\u03bf Equality\/Inequality\/Include columns. \u03a3\u03c4\u03b7\u03bd PostgreSQL, \u03b7 default \u03b5\u03b3\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03b4\u03b5\u03bd \u03c0\u03c1\u03bf\u03c3\u03c6\u03ad\u03c1\u03b5\u03b9 \u03ad\u03c4\u03bf\u03b9\u03bc\u03b7 \u03b1\u03c5\u03c4\u03ae \u03c4\u03b7 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1. \u03a9\u03c3\u03c4\u03cc\u03c3\u03bf, \u03c3\u03c5\u03bd\u03b4\u03c5\u03ac\u03b6\u03bf\u03bd\u03c4\u03b1\u03c2 \u03b4\u03cd\u03bf \u03b9\u03c3\u03c7\u03c5\u03c1\u03ac extensions, \u03c4\u03bf pg_qualstats [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dataplatform.gr\/en\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"DataPlatform.gr\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dataplatform.gr\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-11T04:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-11T08:11:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/db_postgresql.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Stratos Matzouranis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stratos Matzouranis\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/\"},\"author\":{\"name\":\"Stratos Matzouranis\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/person\\\/e87bf4fd02b65cb6aa0942f87245bbaf\"},\"headline\":\"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL\",\"datePublished\":\"2026-09-11T04:00:00+00:00\",\"dateModified\":\"2026-09-11T08:11:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/\"},\"wordCount\":74,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/db_postgresql.png\",\"keywords\":[\"Databases\",\"Performance Tuning\",\"PostgreSQL\",\"RDBMS\"],\"articleSection\":[\"Databases\",\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/\",\"name\":\"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL - DataPlatform.gr\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/db_postgresql.png\",\"datePublished\":\"2026-09-11T04:00:00+00:00\",\"dateModified\":\"2026-09-11T08:11:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/db_postgresql.png\",\"contentUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/db_postgresql.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/pos-vriskoyme-ta-missing-indexes-se-postgresql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0391\u03c1\u03c7\u03b9\u03ba\u03ae\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Databases\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/category\\\/databases\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PostgreSQL\",\"item\":\"https:\\\/\\\/www.dataplatform.gr\\\/category\\\/databases\\\/postgresql\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#website\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/\",\"name\":\"dataplatform.gr - Sky is not the limit!\",\"description\":\"\u0398\u03b5\u03c9\u03c1\u03af\u03b1, \u03bf\u03b4\u03b7\u03b3\u03bf\u03af \u03ba\u03b1\u03b9 \u03c3\u03ba\u03ad\u03c8\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03c5\u03bb\u03b5\u03b9\u03ac \u03c3\u03b1\u03c2 \u03c0\u03b9\u03bf \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03b9\u03ba\u03ac \u03ba\u03b1\u03b9 \u03c0\u03b9\u03bf \u03b5\u03cd\u03ba\u03bf\u03bb\u03b1 \u03c0\u03ac\u03bd\u03c9 \u03c3\u03c4\u03b9\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd, \u03c3\u03c4\u03b7\u03bd SQL, \u03c3\u03c4\u03bf Business Intelligence \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b3\u03b5\u03bd\u03b9\u03ba\u03cc\u03c4\u03b5\u03c1\u03b1.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dataplatform.gr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#organization\",\"name\":\"dataplatform.gr\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_logo_wbacki.png\",\"contentUrl\":\"https:\\\/\\\/www.dataplatform.gr\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/dp_logo_wbacki.png\",\"width\":322,\"height\":139,\"caption\":\"dataplatform.gr\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dataplatform.gr\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dataplatform-gr\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dataplatform.gr\\\/#\\\/schema\\\/person\\\/e87bf4fd02b65cb6aa0942f87245bbaf\",\"name\":\"Stratos Matzouranis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g\",\"caption\":\"Stratos Matzouranis\"},\"sameAs\":[\"https:\\\/\\\/www.dataplatform.gr\"],\"url\":\"https:\\\/\\\/www.dataplatform.gr\\\/en\\\/author\\\/stratos-matzouranis\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL - DataPlatform.gr","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:\/\/www.dataplatform.gr\/en\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/","og_locale":"en_US","og_type":"article","og_title":"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL - DataPlatform.gr","og_description":"\u038c\u03c3\u03bf\u03b9 \u03c0\u03c1\u03bf\u03b5\u03c1\u03c7\u03cc\u03bc\u03b1\u03c3\u03c4\u03b5 \u03b1\u03c0\u03cc \u03c4\u03bf\u03bd \u03ba\u03cc\u03c3\u03bc\u03bf \u03c4\u03bf\u03c5 SQL Server, \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03c3\u03c5\u03bd\u03b7\u03b8\u03af\u03c3\u03b5\u03b9 \u03c3\u03c4\u03b1 \u03b1\u03b3\u03b1\u03c0\u03b7\u03bc\u03ad\u03bd\u03b1 \u03bc\u03b1\u03c2 Missing Index DMVs (sys.dm_db_missing_index_details, sys.dm_db_missing_index_group_stats), \u03c4\u03b1 \u03bf\u03c0\u03bf\u03af\u03b1 \u03bc\u03b1\u03c2 \u03b4\u03af\u03bd\u03bf\u03c5\u03bd \u03ad\u03c4\u03bf\u03b9\u03bc\u03bf \u03c4\u03bf CREATE INDEX command \u03bc\u03b1\u03b6\u03af \u03bc\u03b5 \u03c4\u03bf Avg User Impact \u03ba\u03b1\u03b9 \u03c4\u03bf Equality\/Inequality\/Include columns. \u03a3\u03c4\u03b7\u03bd PostgreSQL, \u03b7 default \u03b5\u03b3\u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03b4\u03b5\u03bd \u03c0\u03c1\u03bf\u03c3\u03c6\u03ad\u03c1\u03b5\u03b9 \u03ad\u03c4\u03bf\u03b9\u03bc\u03b7 \u03b1\u03c5\u03c4\u03ae \u03c4\u03b7 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b1. \u03a9\u03c3\u03c4\u03cc\u03c3\u03bf, \u03c3\u03c5\u03bd\u03b4\u03c5\u03ac\u03b6\u03bf\u03bd\u03c4\u03b1\u03c2 \u03b4\u03cd\u03bf \u03b9\u03c3\u03c7\u03c5\u03c1\u03ac extensions, \u03c4\u03bf pg_qualstats [&hellip;]","og_url":"https:\/\/www.dataplatform.gr\/en\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/","og_site_name":"DataPlatform.gr","article_publisher":"https:\/\/www.facebook.com\/dataplatform.gr\/","article_published_time":"2026-09-11T04:00:00+00:00","article_modified_time":"2026-09-11T08:11:52+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/db_postgresql.png","type":"image\/png"}],"author":"Stratos Matzouranis","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stratos Matzouranis","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/#article","isPartOf":{"@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/"},"author":{"name":"Stratos Matzouranis","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/person\/e87bf4fd02b65cb6aa0942f87245bbaf"},"headline":"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL","datePublished":"2026-09-11T04:00:00+00:00","dateModified":"2026-09-11T08:11:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/"},"wordCount":74,"commentCount":0,"publisher":{"@id":"https:\/\/www.dataplatform.gr\/#organization"},"image":{"@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/db_postgresql.png","keywords":["Databases","Performance Tuning","PostgreSQL","RDBMS"],"articleSection":["Databases","PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/","url":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/","name":"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL - DataPlatform.gr","isPartOf":{"@id":"https:\/\/www.dataplatform.gr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/db_postgresql.png","datePublished":"2026-09-11T04:00:00+00:00","dateModified":"2026-09-11T08:11:52+00:00","breadcrumb":{"@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/#primaryimage","url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/db_postgresql.png","contentUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/10\/db_postgresql.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/www.dataplatform.gr\/pos-vriskoyme-ta-missing-indexes-se-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0391\u03c1\u03c7\u03b9\u03ba\u03ae","item":"https:\/\/www.dataplatform.gr\/"},{"@type":"ListItem","position":2,"name":"Databases","item":"https:\/\/www.dataplatform.gr\/category\/databases\/"},{"@type":"ListItem","position":3,"name":"PostgreSQL","item":"https:\/\/www.dataplatform.gr\/category\/databases\/postgresql\/"},{"@type":"ListItem","position":4,"name":"\u03a0\u03ce\u03c2 \u03b2\u03c1\u03af\u03c3\u03ba\u03bf\u03c5\u03bc\u03b5 \u03c4\u03b1 Missing Indexes \u03c3\u03b5 PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/www.dataplatform.gr\/#website","url":"https:\/\/www.dataplatform.gr\/","name":"dataplatform.gr - Sky is not the limit!","description":"\u0398\u03b5\u03c9\u03c1\u03af\u03b1, \u03bf\u03b4\u03b7\u03b3\u03bf\u03af \u03ba\u03b1\u03b9 \u03c3\u03ba\u03ad\u03c8\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03ba\u03ac\u03bd\u03b5\u03c4\u03b5 \u03c4\u03b7 \u03b4\u03bf\u03c5\u03bb\u03b5\u03b9\u03ac \u03c3\u03b1\u03c2 \u03c0\u03b9\u03bf \u03c0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03b9\u03ba\u03ac \u03ba\u03b1\u03b9 \u03c0\u03b9\u03bf \u03b5\u03cd\u03ba\u03bf\u03bb\u03b1 \u03c0\u03ac\u03bd\u03c9 \u03c3\u03c4\u03b9\u03c2 \u03b2\u03ac\u03c3\u03b5\u03b9\u03c2 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03c9\u03bd, \u03c3\u03c4\u03b7\u03bd SQL, \u03c3\u03c4\u03bf Business Intelligence \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b1 \u03b4\u03b5\u03b4\u03bf\u03bc\u03ad\u03bd\u03b1 \u03b3\u03b5\u03bd\u03b9\u03ba\u03cc\u03c4\u03b5\u03c1\u03b1.","publisher":{"@id":"https:\/\/www.dataplatform.gr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dataplatform.gr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dataplatform.gr\/#organization","name":"dataplatform.gr","url":"https:\/\/www.dataplatform.gr\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/logo\/image\/","url":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_logo_wbacki.png","contentUrl":"https:\/\/www.dataplatform.gr\/wp-content\/uploads\/2020\/06\/dp_logo_wbacki.png","width":322,"height":139,"caption":"dataplatform.gr"},"image":{"@id":"https:\/\/www.dataplatform.gr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dataplatform.gr\/","https:\/\/www.linkedin.com\/company\/dataplatform-gr\/"]},{"@type":"Person","@id":"https:\/\/www.dataplatform.gr\/#\/schema\/person\/e87bf4fd02b65cb6aa0942f87245bbaf","name":"Stratos Matzouranis","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ab973bc4bd1673c43d45de5633a624d9ad13c06902dfdd5a6e3fd9885903865e?s=96&d=mm&r=g","caption":"Stratos Matzouranis"},"sameAs":["https:\/\/www.dataplatform.gr"],"url":"https:\/\/www.dataplatform.gr\/en\/author\/stratos-matzouranis\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/6064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/comments?post=6064"}],"version-history":[{"count":2,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/6064\/revisions"}],"predecessor-version":[{"id":6110,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/posts\/6064\/revisions\/6110"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/media\/2376"}],"wp:attachment":[{"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/media?parent=6064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/categories?post=6064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dataplatform.gr\/en\/wp-json\/wp\/v2\/tags?post=6064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}