RE: Why the index is not used ? - Mailing list pgsql-sql

From ROS Didier
Subject RE: Why the index is not used ?
Date
Msg-id 3a14f7f8fbda4e868b663b31e8c5fa16@PCYINTPEXMU001.NEOPROD.EDF.FR
Whole thread Raw
In response to Re: Why the index is not used ?  (Francisco Olarte <folarte@peoplecall.com>)
Responses RE: Why the index is not used ?  ("Kumar, Virendra" <Virendra.Kumar@guycarp.com>)
RE: Why the index is not used ?  ("Kumar, Virendra" <Virendra.Kumar@guycarp.com>)
RE: Why the index is not used ?  ("Kumar, Virendra" <Virendra.Kumar@guycarp.com>)
Re: Why the index is not used ?  (Vladimir Ryabtsev <greatvovan@gmail.com>)
Re: Why the index is not used ?  (Vladimir Ryabtsev <greatvovan@gmail.com>)
Re: Why the index is not used ?  (Vladimir Ryabtsev <greatvovan@gmail.com>)
Re: Why the index is not used ?  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: Why the index is not used ?  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: Why the index is not used ?  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: Why the index is not used ?  (Paul McGarry <paul@paulmcgarry.com>)
Re: Why the index is not used ?  (Paul McGarry <paul@paulmcgarry.com>)
Re: Why the index is not used ?  (Paul McGarry <paul@paulmcgarry.com>)
List pgsql-sql
Hi Francisco

    Thank you for your remark. 
    You're right, but it's the only procedure I found to make search on encrypted fields with good response times
(usingindex) !
 

    Regarding access to the file system, our servers are in protected network areas. few people can connect to it.

    it's not the best solution, but we have data encryption needs and good performance needs too. I do not know how to
doit except the specified procedure..
 
    if anyone has any proposals to put this in place, I'm interested.

    Thanks in advance

Best Regards
Didier ROS

-----Message d'origine-----
De : folarte@peoplecall.com [mailto:folarte@peoplecall.com] 
Envoyé : dimanche 7 octobre 2018 17:58
À : ROS Didier <didier.ros@edf.fr>
Cc : pavel.stehule@gmail.com; pgsql-sql@lists.postgresql.org; pgsql-performance@lists.postgresql.org;
pgsql-general@lists.postgresql.org
Objet : Re: Why the index is not used ?

ROS:

On Sun, Oct 7, 2018 at 3:13 PM, ROS Didier <didier.ros@edf.fr> wrote:
....
> -        INSERT INTO cartedecredit(username,cc)  SELECT 'individu ' || x.id, pgp_sym_encrypt('test value ' || x.id,
'motdepasse','compress-algo=2,cipher-algo=aes256') FROM generate_series(1,100000) AS x(id);
 
> -        CREATE INDEX idx_cartedecredit_cc02 ON cartedecredit(pgp_sym_decrypt(cc, 'motdepasse','compress-algo=2,
cipher-algo=aes256'));

If my french is not too rusty you are encrypting a credit-card, and then storing an UNENCRYPTED copy in the index. So,
gettingit from the server is trivial for anyone with filesystem access.
 

Francisco Olarte.



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires
etles informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa
destination,toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse. 

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le
divulguerou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre
système,ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous
remercionségalement d'en avertir immédiatement l'expéditeur par retour du message. 

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont
sécuriséesou dénuées de toute erreur ou virus. 
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in
thisMessage is confidential. Any use of information contained in this Message not in accord with its purpose, any
disseminationor disclosure, either whole or partial, is prohibited except formal approval. 

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this
messagein error, please delete it and all copies from your system and notify the sender immediately by return message. 

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.

pgsql-sql by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: Why the index is not used ?
Next
From: "Kumar, Virendra"
Date:
Subject: RE: Why the index is not used ?