Skip to content

Commit

Permalink
Merge pull request #59 from superette/master
Browse files Browse the repository at this point in the history
traduction bloom.xml et pgvisibility.xml
  • Loading branch information
superette committed Jun 17, 2016
2 parents a8f28bb + 08d9d8a commit 07db056
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 83 deletions.
97 changes: 54 additions & 43 deletions postgresql/bloom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,56 @@
</indexterm>

<para>
<literal>bloom</literal> is a module which implements an index access method. It comes
as an example of custom access methods and generic WAL records usage. But it
is also useful in itself.
</para>
<literal>bloom</literal> est un module qui implémente une méthode
d'accès par index. Il se présente comme un exemple de méthode d'accès
personnalisée et une utilisation générique des enregistrements dans les
WAL. Mais il est aussi utile en tant que tel.
</para>

<sect2>
<title>Introduction</title>

<para>
The implementation of a
<ulink url="http://en.wikipedia.org/wiki/bloom_filter">Bloom filter</ulink>
allows fast exclusion of non-candidate tuples via signatures.
Since a signature is a lossy representation of all indexed attributes,
search results must be rechecked using heap information.
The user can specify signature length (in uint16, default is 5) and the
number of bits, which can be set per attribute (1 &lt; colN &lt; 2048).
La mise en oeuvre du
<ulink url="https://fr.wikipedia.org/wiki/Filtre_de_Bloom"> filtre
de bloom</ulink> autorise l'exclusion rapide des lignes non
pertinentes grâce aux signatures.
Puisque une signature est une représentation à perte de tous les
attributs indexés, les résultats de la recherche doivent être
revérifiés en utilisant les informations des données non triées.
L'utilisateur peut spécifier la taille de la signature (avec uint16,
la valeur par défaut est 5) et le nombre d'octets peut être défini par
attribut (1 &lt; colN &lt; 2048).
</para>

<para>
This index is useful if a table has many attributes and queries include
arbitrary combinations of them. A traditional <literal>btree</literal> index is
faster than a bloom index, but it can require many indexes to support all
possible queries where one needs only a single bloom index. A Bloom index
supports only equality comparison. Since it's a signature file, and not a
tree, it always must be read fully, but sequentially, so that index search
performance is constant and doesn't depend on a query.
Cet index est utile si une table possède de nombreux attributs et
qu'ils sont utilisés combinés dans des requêtes de façon arbitraire.
Le traditionnel index <literal>btree</literal> est plus rapide
qu'un index bloom, mais il est nécessaire de créer de nombreux
index pour qu'ils soient utilisés par les différentes formes d'une
requête tandis qu'il ne faut qu'un seul index bloom.
Un index bloom ne supporte que les comparaisons d'équivalence.
Puisque c'est un fichier de signature, et non pas un arbre, il devra
toujours être lu intégralement, de façon séquentielle, ce qui permet
des performances constantes et non dépendantes de la requête.
</para>
</sect2>

<sect2>
<title>Parameters</title>
<title>Paramètres</title>

<para>
<literal>bloom</literal> indexes accept the following parameters in the
<literal>WITH</literal>
clause.
L'index <literal>bloom</literal> accepte les paramètres suivants dans
la clause <literal>WITH</literal>.
</para>

<variablelist>
<varlistentry>
<term><literal>length</literal></term>
<listitem>
<para>
Length of signature in uint16 type values
Longueur de la signature par une valeur de type uint16.
</para>
</listitem>
</varlistentry>
Expand All @@ -62,18 +68,18 @@
<term><literal>col1 &mdash; col16</literal></term>
<listitem>
<para>
Number of bits for corresponding column
Nombre d'octets pour la colonne correspondante.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>

<sect2>
<title>Examples</title>
<title>Exemples</title>

<para>
An example of an index definition is given below.
Exemple de définition et d'utilisation de cet index
</para>

<programlisting>
Expand All @@ -82,12 +88,14 @@ CREATE INDEX bloomidx ON tbloom(i1,i2,i3)
</programlisting>

<para>
Here, we created a bloom index with a signature length of 80 bits,
and attributes i1 and i2 mapped to 2 bits, and attribute i3 to 4 bits.
Ici, nous avons créé un index bloom, avec une signature d'une longueur
de 80 octets. Les attributs i1 et i2 correspondent à 2 octets, et
l'attribut i3 correspond à 4 octets.
</para>

<para>
Here is a fuller example of index definition and usage:
Exemple complet de définition d'un index bloom et utilisation de
ce dernier.
</para>

<programlisting>
Expand Down Expand Up @@ -128,7 +136,7 @@ SELECT pg_relation_size('btree_idx');
</programlisting>

<para>
Seqscan is slow.
Le seqscan est lent.
</para>

<programlisting>
Expand All @@ -144,7 +152,7 @@ SELECT pg_relation_size('btree_idx');
</programlisting>

<para>
A btree index will be not used for this query.
L'index btree ne sera pas utilisé avec cette requête.
</para>

<programlisting>
Expand All @@ -161,13 +169,14 @@ SELECT pg_relation_size('btree_idx');
</sect2>

<sect2>
<title>Opclass interface</title>
<title>Interface OpClass</title>

<para>
The Bloom opclass interface is simple. It requires 1 supporting function:
a hash function for the indexing datatype. It provides 1 search operator:
the equality operator. The example below shows <literal>opclass</literal>
definition for <literal>text</literal> datatype.
L'interface opclass pour Bloom est simple. Elle nécessite une fonction
de support : la fonction hash pour indexer les types de données.
Elle nécessite un opérateur de recherche : l'opérateur d'équivalence.
L'exemple suivant présente la définition <literal>opclass</literal>
pour un type de données <literal>text</literal>.
</para>

<programlisting>
Expand All @@ -179,30 +188,32 @@ DEFAULT FOR TYPE text USING bloom AS
</sect2>

<sect2>
<title>Limitation</title>
<title>Limitations</title>
<para>

<itemizedlist>
<listitem>
<para>
For now, only opclasses for <literal>int4</literal>, <literal>text</literal> come
with the module. However, users may define more of them.
Pour l'instant, il n'existe dans ce module, que des opclasses pour
<literal>int4</literal>, <literal>text</literal>.
Cependant, les utilisateurs peuvent en définir d'autres.
</para>
</listitem>

<listitem>
<para>
Only the <literal>=</literal> operator is supported for search at the
moment. But it's possible to add support for arrays with contains and
intersection operations in the future.
Pour l'instant, seul l'opérateur <literal>=</literal> est supporté
pour faire une recherche. Mais il sera possible dans le futur
d'ajouter le support des tableaux avec les opérations contenu et
intersection.
</para>
</listitem>
</itemizedlist>
</para>
</sect2>

<sect2>
<title>Authors</title>
<title>Auteurs</title>

<para>
Teodor Sigaev <email>teodor@postgrespro.ru</email>,
Expand Down
96 changes: 56 additions & 40 deletions postgresql/pgvisibility.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,99 +9,115 @@
</indexterm>

<para>
The <filename>pg_visibility</filename> module provides a means for examining the
visibility map (VM) and page-level visibility information.
Le module <filename>pg_visibility</filename> fourni la possibilité
d'examiner la visibility map (VM) et les informations de visibilité
au niveau page.
</para>

<para>
These routines return information about three different bits. The
all-visible bit in the visibility map indicates that every tuple on
a given page of a relation is visible to every current transaction. The
all-frozen bit in the visibility map indicates that every tuple on the
page is frozen; that is, no future vacuum will need to modify the page
until such time as a tuple is inserted, updated, deleted, or locked on
that page. The page-level <literal>PD_ALL_VISIBLE</literal> bit has the
same meaning as the all-visible bit in the visibility map, but is stored
within the data page itself rather than a separate data structure. These
will normally agree, but the page-level bit can sometimes be set while the
visibility map bit is clear after a crash recovery; or they can disagree
because of a change which occurs after <literal>pg_visibility</literal> examines
the visibility map and before it examines the data page.
Cette routine renvoie les informations sur trois octets différents.
L'octet totalement visible (all-visible) de la visbility map indique
que chaque ligne d'une page donnée d'une relation est visible pour
toute transaction courante.
L'octet totalement figé (all-frozen) de la visibility map indique
que chaque ligne de la page est figée; c'est à dire qu'aucun vacuum
n'aura besoin de modifier la page tant qu'une ligne n'est pas insérée,
mise à jour, supprimée ou verrouillée dans cette page.
L'octet de niveau de page <literal>PD_ALL_VISIBLE</literal> a la même
signification que l'octet totalement visible de la visibility map, mais
il est stocké au sein de la page plutôt que dans une structure de donnée
séparée. Ces deux octets seront normalement identiques, mais l'octet de
niveau de page peut parfois rester défini pendant que la visibility map
est purgée lors de la récupération suite à un crash ; ou ils peuvent
être différents suite à un changement survenant après que
<literal>pg_visibility</literal> ait examiné la visibility map et avant
qu'il ait examiné la page de donnée.
</para>

<para>
Functions which display information about <literal>PG_ALL_VISIBLE</literal>
are much more costly than those which only consult the visibility map,
because they must read the relation's data blocks rather than only the
(much smaller) visibility map.
Les fonctions qui affichent les informations concernant
<literal>PG_ALL_VISIBLE</literal> sont plus beaucoup plus coûteuses que
celles qui consultent uniquement la visibility map, en effet, elles
doivent lire les blocs de données des relations plutôt que de ne
s'intéresser qu'a la visibility map (qui est bien plus petite)
</para>

<sect2>
<title>Functions</title>
<title>Fonctions</title>

<variablelist>
<varlistentry>
<term><function>pg_visibility_map(regclass, blkno bigint, all_visible OUT boolean, all_frozen OUT boolean) returns record</function></term>
<term><function>pg_visibility_map(regclass, blkno bigint, all_visible
OUT boolean, all_frozen OUT boolean) renvoie un enregistrement
</function></term>
<listitem>
<para>
Returns the all-visible and all-frozen bits in the visibility map for
the given block of the given relation.
Renvoie tout les octets complétement visibles et complétement figés
de la visibility map pour un bloc donné pour une relation donnée.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><function>pg_visibility(regclass, blkno bigint, all_visible OUT boolean, all_frozen OUT boolean, pd_all_visible OUT boolean) returns record</function></term>
<term><function>pg_visibility(regclass, blkno bigint, all_visible OUT
boolean, all_frozen OUT boolean, pd_all_visible OUT boolean) renvoie
un enregistrement</function></term>
<listitem>
<para>
Returns the all-visible and all-frozen bits in the visibility map for
the given block of the given relation, plus the
<literal>PD_ALL_VISIBILE</literal> bit for that block.
Renvoie tout les octets complétement visibles et complétement figés
de la visibility map pour un bloc donné pour une relation donnée
ainsi que l'octet <literal>PD_ALL_VISIBLE</literal> pour le bloc.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><function>pg_visibility_map(regclass, blkno OUT bigint, all_visible OUT boolean, all_frozen OUT boolean) returns record</function></term>
<term><function>pg_visibility_map(regclass, blkno OUT bigint,
all_visible OUT boolean, all_frozen OUT boolean) renvoie
un enregistrement</function></term>
<listitem>
<para>
Returns the all-visible and all-frozen bits in the visibility map for
each block the given relation.
Renvoie tout les octets complétement visibles et complétement figés
de la visibility map pour un bloc donné pour une relation donnée.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><function>pg_visibility(regclass, blkno OUT bigint, all_visible OUT boolean, all_frozen OUT boolean, pd_all_visible OUT boolean) returns record</function></term>
<term><function>pg_visibility(regclass, blkno OUT bigint, all_visible
OUT boolean, all_frozen OUT boolean, pd_all_visible OUT boolean) renvoie
un enregistrement</function></term>

<listitem>
<para>
Returns the all-visible and all-frozen bits in the visibility map for
each block the given relation, plus the <literal>PD_ALL_VISIBLE</literal>
bit for each block.
Renvoie tout les octets complétement visibles et complétement figés
de la visibility map pour un bloc donné pour une relation donnée
ainsi que l'octet <literal>PD_ALL_VISIBLE</literal> pour le bloc.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><function>pg_visibility_map_summary(regclass, all_visible OUT bigint, all_frozen OUT bigint) returns record</function></term>
<term><function>pg_visibility_map_summary(regclass, all_visible OUT
bigint, all_frozen OUT bigint) renvoie
un enregistrement</function></term>

<listitem>
<para>
Returns the number of all-visible pages and the number of all-frozen
pages in the relation according to the visibility map.
</para>
Renvoie le nombre de pages complétement visible ainsi que le nombre
de pages complétement figées de la relation, en concordance avec la
visibility map.
</listitem>
</varlistentry>
</variablelist>

<para>
By default, these functions are not publicly executable.
Par défaut, ces fonctions ne sont pas exécutables par public.
</para>
</sect2>

<sect2>
<title>Author</title>
<title>Auteur</title>

<para>
Robert Haas <email>rhaas@postgresql.org</email>
Expand Down

0 comments on commit 07db056

Please sign in to comment.