<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: PostgreSQL: Script to find a Missing Indexes of the schema	</title>
	<atom:link href="https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Wed, 18 Mar 2020 13:17:32 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>
		By: Bassel		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-8162</link>

		<dc:creator><![CDATA[Bassel]]></dc:creator>
		<pubDate>Wed, 18 Mar 2020 13:17:32 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-8162</guid>

					<description><![CDATA[could you please complete the script to give us the script of index creation also ?]]></description>
			<content:encoded><![CDATA[<p>could you please complete the script to give us the script of index creation also ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Cuneyd Tanriverdi		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-7362</link>

		<dc:creator><![CDATA[Cuneyd Tanriverdi]]></dc:creator>
		<pubDate>Tue, 18 Jun 2019 11:09:19 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-7362</guid>

					<description><![CDATA[Hi, When I tried to execute script from Pgadmin4 or DBEaver tool, I am getting an error like:
ERROR:  relation &quot;jobdeclinefeedback&quot; does not exist
its because postgresql is case sensetive. On database Table name is &quot;JobDecLineFeedback&quot;
How can we fix your script about this issue.

I think this is the issue line:
pg_size_pretty(pg_relation_size(relname::regclass))]]></description>
			<content:encoded><![CDATA[<p>Hi, When I tried to execute script from Pgadmin4 or DBEaver tool, I am getting an error like:<br />
ERROR:  relation &#8220;jobdeclinefeedback&#8221; does not exist<br />
its because postgresql is case sensetive. On database Table name is &#8220;JobDecLineFeedback&#8221;<br />
How can we fix your script about this issue.</p>
<p>I think this is the issue line:<br />
pg_size_pretty(pg_relation_size(relname::regclass))</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dietmar Schnabel		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-6682</link>

		<dc:creator><![CDATA[Dietmar Schnabel]]></dc:creator>
		<pubDate>Mon, 10 Sep 2018 07:53:50 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-6682</guid>

					<description><![CDATA[I think this script is not okay as it does a strange calculation with regards to calculation of index scans..

I find a quick adaption of this script better:

SELECT 
	relname AS TableName
	,seq_scan AS TotalSeqScan
	,CASE WHEN seq_scan&#062; 0 
		THEN &#039;Missing Index Found&#039; 
		ELSE &#039;Missing Index Not Found&#039; 
	END AS MissingIndex
	,pg_size_pretty(pg_relation_size(relname::regclass)) AS TableSize
	,idx_scan AS TotalIndexScan
FROM pg_stat_all_tables
WHERE schemaname=&#039;public&#039;
	AND pg_relation_size(relname::regclass)&#062;100000 
ORDER BY 2 DESC;

Here this solution was showing us many more tables with problems. Hope this helps someone!

Dietmar]]></description>
			<content:encoded><![CDATA[<p>I think this script is not okay as it does a strange calculation with regards to calculation of index scans..</p>
<p>I find a quick adaption of this script better:</p>
<p>SELECT<br />
	relname AS TableName<br />
	,seq_scan AS TotalSeqScan<br />
	,CASE WHEN seq_scan&gt; 0<br />
		THEN &#8216;Missing Index Found&#8217;<br />
		ELSE &#8216;Missing Index Not Found&#8217;<br />
	END AS MissingIndex<br />
	,pg_size_pretty(pg_relation_size(relname::regclass)) AS TableSize<br />
	,idx_scan AS TotalIndexScan<br />
FROM pg_stat_all_tables<br />
WHERE schemaname=&#8217;public&#8217;<br />
	AND pg_relation_size(relname::regclass)&gt;100000<br />
ORDER BY 2 DESC;</p>
<p>Here this solution was showing us many more tables with problems. Hope this helps someone!</p>
<p>Dietmar</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Lizes		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-5670</link>

		<dc:creator><![CDATA[Lizes]]></dc:creator>
		<pubDate>Tue, 13 Jun 2017 20:38:32 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-5670</guid>

					<description><![CDATA[good work anvesh, very few people are sharing their knowledge on PostgreSQL,]]></description>
			<content:encoded><![CDATA[<p>good work anvesh, very few people are sharing their knowledge on PostgreSQL,</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Venil		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-5531</link>

		<dc:creator><![CDATA[Venil]]></dc:creator>
		<pubDate>Fri, 10 Mar 2017 12:18:18 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-5531</guid>

					<description><![CDATA[helped a lot... thanks]]></description>
			<content:encoded><![CDATA[<p>helped a lot&#8230; thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-5121</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 04 Jun 2016 10:23:12 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-5121</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-5120&quot;&gt;Aniltech&lt;/a&gt;.

Like SQL Server Index tuning wizard, we do not have such tool in PostgreSQL. Generally, you have to analyze filter, joins, table data and bases on that you should apply proper indexes.]]></description>
			<content:encoded><![CDATA[<p>Like SQL Server Index tuning wizard, we do not have such tool in PostgreSQL. Generally, you have to analyze filter, joins, table data and bases on that you should apply proper indexes.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Aniltech		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-5120</link>

		<dc:creator><![CDATA[Aniltech]]></dc:creator>
		<pubDate>Sat, 04 Jun 2016 09:13:14 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-5120</guid>

					<description><![CDATA[Good. But how can i find the columns which need the index.]]></description>
			<content:encoded><![CDATA[<p>Good. But how can i find the columns which need the index.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: steen		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-2049</link>

		<dc:creator><![CDATA[steen]]></dc:creator>
		<pubDate>Sat, 30 Jan 2016 08:09:28 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-2049</guid>

					<description><![CDATA[Muchos Gracias for your blog article. Great.]]></description>
			<content:encoded><![CDATA[<p>Muchos Gracias for your blog article. Great.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: fargus		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-1272</link>

		<dc:creator><![CDATA[fargus]]></dc:creator>
		<pubDate>Mon, 28 Dec 2015 15:01:39 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-1272</guid>

					<description><![CDATA[I really like and appreciate your blog post.Much thanks again. Fantastic.]]></description>
			<content:encoded><![CDATA[<p>I really like and appreciate your blog post.Much thanks again. Fantastic.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-968</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 15 Dec 2015 06:02:37 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=754#comment-968</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2015/10/postgresql-script-to-find-a-missing-indexes-of-the-schema/#comment-956&quot;&gt;sdorttuiiplmnr&lt;/a&gt;.

Thanks Man !]]></description>
			<content:encoded><![CDATA[<p>Thanks Man !</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
