Skip to content

Commit

Permalink
Update two-columns-indexing.md
Browse files Browse the repository at this point in the history
inverted index comments
  • Loading branch information
BorisTyshkevich authored Sep 30, 2024
1 parent e2e5eb8 commit 69d3de7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/en/altinity-kb-schema-design/two-columns-indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ order by (toStartOfDay(ts),A,B);

bloom_filter index type instead of min_max could work fine in some situations.

### Reverse index as a projection
### Inverted index as a projection

```sql
create table X (
Expand All @@ -63,7 +63,9 @@ where A in (select A from X where B='....' and ts between ...)
and B='...' and ts between ... ;
```

A separate table with a Materialized View can also be used similarly.
- The number of rows the subquery returns should not be very high. 1M rows seems to be a suitable limit.
- A separate table with a Materialized View can also be used similarly.
- accessing pattern for the main table will "point", so better to lower index_granularity to 256. That will increase RAM usage by Primary Key


### mortonEncode
Expand Down

0 comments on commit 69d3de7

Please sign in to comment.