Re: Partial index plan/cardinality costing

2018-10-08 Thread Justin Pryzby
Please don't cross-post to lists. >insert into s(status, action_at, m_fk) >select > ( CASE WHEN series.n % 100 < 80 THEN > (ARRAY['E', 'C'])[(series.n % 2) + 1] >ELSE > (ARRAY['P', 'PD', 'A'])[((random() * 3)::integer % 3) + 1] >END > ), > ( >CASE WHEN series.n % 100 < 80

Re: Partial index plan/cardinality costing

2018-10-08 Thread James Coleman
Bump, and curious if anyone on hackers has any ideas here: of particular interest is why the (pk, created_at) index can possibly be more valuable than the (created_at, pk) variant since the former effectively implies having to scan the entire index. On Fri, Sep 7, 2018 at 12:17 PM James Coleman wr

Re: Why the index is not used ?

2018-10-08 Thread Paul McGarry
Hi Didier, Yes, credit cards are a very specific space that probably gets people who are familiar with it going a bit. By the time you factor in general security practices, specific PCI requirements, your threat model and likely business requirements (needing relatively free access to parts of

Re: Why the index is not used ?

2018-10-08 Thread Tomas Vondra
Hi, On 10/08/2018 04:10 PM, ROS Didier wrote: > Hi Tomas >     >     Thank you for your answer and recommendation which is very > interesting. I'm going to study the PCI DSS document right now. > > * Here are my answer to your question : > > />>/ > /What is your threat model?/ > /< we

RE: Why the index is not used ?

2018-10-08 Thread ROS Didier
Hi Paul Thank you very much for your feedback which is very informative. I understand that concerning the encryption of credit card numbers, it is imperative to respect the PCI DSS document. I am going to study it. However, I would like to say that I

RE: Why the index is not used ?

2018-10-08 Thread ROS Didier
Hi Tomas Thank you for your answer and recommendation which is very interesting. I'm going to study the PCI DSS document right now. - Here are my answer to your question : >> What is your threat model? << we want to prevent access to sensitive data for everyone except those who have

RE: Why the index is not used ?

2018-10-08 Thread ROS Didier
Hi Vlad OK, I take into account your remark about the need to do research on encrypted data. My answers to your remarks : >> you can use a deterministic algorithm for it (without salt) << Can you give me on of these deterministic algorithms(without salt) ? Best Regards Didier De :

RE: Why the index is not used ?

2018-10-08 Thread ROS Didier
Hi Vlad Sorry for this delay, but apparently the subject is of interest to many people in the community. I received a lot of comments and answers. I wrote my answers in the body of your message below Best Regards Didier De : greatvo...@gmail.com [mailto:greatvo...@gmail.com] Envoyé : samedi 6 oc

RE: Why the index is not used ?

2018-10-08 Thread ROS Didier
Hi Virendra You think that outside encryption of the database is the best solution ? How do you manage the encryption key ? Can you give me some examples of this kind of solution. Best Regards Didier ROS -Message d'origine- De : virendra.ku...@guycarp.c