Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Index on encrypted column #697

Open
3 tasks done
devendermishra opened this issue Jan 11, 2024 · 1 comment
Open
3 tasks done

[ISSUE] Index on encrypted column #697

devendermishra opened this issue Jan 11, 2024 · 1 comment
Assignees
Labels

Comments

@devendermishra
Copy link

devendermishra commented Jan 11, 2024

Describe the bug
In one of my table, there is an encrypted field e_phone. Table has 3 Million of rows. Without using an index, it is taking approx 5sec to search on e_phone field.

After creating a functional index as follows:

CREATE INDEX e_phone_index ON customer_detail((convert(substr(e_phone, 1, 33), binary)));

It is taking less time.

I want to know that what are the other suggested indexes to be create on encrypted columns for searching?

To Reproduce
NA

Expected behavior
NA

Acra configuration files
NA

Environment (please complete the following information):

  • Acra version: [0.95.0]

  • Database server and its version: [MySQL 5.7, MySQL 8]

  • Installed components:

    • AcraServer
  • Data-in-transit encryption between Acra and the client-side application:

    • no transport encryption
  • Installation way:

    • via Docker

Additional context
NA

@Lagovas
Copy link
Collaborator

Lagovas commented Jan 11, 2024

I'm not sure, but you can try hash index type (only if it supports expressions as a column). Searchable encryption supports only ==/<> operations, so hash index is relevant and can be better. Would appreciate feedback if you would try it.

All other solutions are out-of-scope index capabilities. The next suggestion is partitioning which will reduce the size of the index and reduce amount of rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants