phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serega Sheypak <>
Subject Secondary index for narrow tables. Use it or just do "double insert"
Date Mon, 13 Jul 2015 09:52:10 GMT
Hi, I have an immutable table with 4 columns:

id1, id2, meta_id1, meta_id2.
Primary key is id1, I select all fields from table "row" by id1. So it's
the fastest way to get data.
Second access path is to select by id2.

I have serious mixed workload. What is better:
1. use secondary index for id2
2. just insert two rows:
id1, id2, meta_id1, meta_id2
id2, id1, meta_id1, meta_id2
and avoid using secondary index.

Tried to read PPT notes. What is index for immutable table? It's second
"invisible" table which points id2 as key to id1 (in my case) updated by

View raw message