<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - Never create index on a boolean type.]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=1925&amp;type=atom"/>
	<updated>2014-01-02T07:20:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=1925</id>
		<entry>
			<title type="html"><![CDATA[Odp: Never create index on a boolean type.]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4953#p4953"/>
			<content type="html"><![CDATA[Tu jest całkiem niezły opis działania index-ów [url=http://wazniak.mimuw.edu.pl/index.php?title=BD-2st-1.2-w07.tresc-1.1-toc]Link[/url], opis pomoże Ci zrozumieć zagadnienie]]></content>
			<author>
				<name><![CDATA[c_michal]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=627</uri>
			</author>
			<updated>2014-01-02T07:20:54Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4953#p4953</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Never create index on a boolean type.]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4952#p4952"/>
			<content type="html"><![CDATA[Dzięki za odpowiedź :)]]></content>
			<author>
				<name><![CDATA[pkozak]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1697</uri>
			</author>
			<updated>2013-12-31T16:34:49Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4952#p4952</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Never create index on a boolean type.]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4951#p4951"/>
			<content type="html"><![CDATA[Mała selektywność danych.

Jeśli masz indeks na polu typu integer, to tam jest sporo możliwych wartości (zazwyczaj, nie mówię o przypadkach specyficznych).

boolean ma (z definicji) tylko 2 lub 3 wartości. Więc, jeśli rozkład jest równy, to index nie ma znaczenia bo za mała selektywność danych.

A jak jakaś wartośc boola jest bardzo częsta, a inna rzadka, to lepiej użyć indeksów częściowych, z warunkiem na wartość booleana, ale indeksujące coś innego - bardziej sensownego.]]></content>
			<author>
				<name><![CDATA[depesz]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1564</uri>
			</author>
			<updated>2013-12-31T15:53:12Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4951#p4951</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Never create index on a boolean type.]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=4950#p4950"/>
			<content type="html"><![CDATA[W prezentacji z PGCon 2013 padają słowa [url=http://postimg.org/image/xvz6w434n/]Never create index on a boolean type[/url]. Czy ktoś może mi wyjaśnić z czego to wynika?]]></content>
			<author>
				<name><![CDATA[pkozak]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=1697</uri>
			</author>
			<updated>2013-12-31T11:42:33Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=4950#p4950</id>
		</entry>
</feed>
