add warnings about sequential ids

This commit is contained in:
Matthew Jaffee 2018-03-02 11:00:46 -06:00
parent 280b21b533
commit dcb411d028
No known key found for this signature in database
GPG key ID: 51C676AF9FFCDB87
3 changed files with 8 additions and 0 deletions

View file

@ -10,6 +10,7 @@ nav = [
## Client Libraries
This section contains example code for client libraries in several languages. Please remember that when modeling your data in Pilosa, it is best to keep row and column ids sequential. It is not wise to use the output of a hash, or randomly distributed ids with Pilosa.
### Go

View file

@ -24,6 +24,8 @@ Rows and columns can represent anything (they could even represent the same set
Pilosa lays out data first in rows, so queries which get all the set bits in one or many rows, or compute a combining operation on multiple rows such as Intersect or Union are the fastest. Pilosa also has the ability to categorize rows into different "frames" and quickly retrieve the top rows in a frame sorted by the number of bits set in each row.
Please note that Pilosa is most performant when row and column IDs are sequential starting from 0. You can deviate from this to some degree, but if you try to set a bit with column ID 2^63, bad things will start to happen.
![data model diagram](/img/docs/data-model.svg)
### Index

View file

@ -226,6 +226,11 @@ curl localhost:10101/index/repository/query \
{"results":[true]}
```
Please note that while user ID 99999 may not be sequential with the other column IDs, it is still a relatively low number.
Don't try to use arbitrary 64-bit integers as column or row IDs in Pilosa - this will lead to poor performance, out of memory errors, and more.
### What's Next?
You can jump to [Data Model](../data-model/) for an in-depth look at Pilosa's data model, or [Query Language](../query-language/) for more details about **PQL**, the query language of Pilosa. Check out the [Examples](../examples/) page for example implementations of real world use cases for Pilosa. Ready to get going in your favorite language? Have a peek at our small but expanding set of official [Client Libraries](../client-libraries/).