Great suggestion! Thanks Avi!
On Mon, Mar 27, 2017 at 3:47 PM, Avi Kivity wrote:
> You can use static columns to and just one table:
>
>
> CREATE TABLE documents (
>
> doc_id uuid,
>
> element_id uuid,
>
> description text static,
>
> doc_title text static,
>
> element_title
You can use static columns to and just one table:
CREATE TABLE documents (
doc_id uuid,
element_id uuid,
description text static,
doc_title text static,
element_title text,
PRIMARY KEY (doc_id, element_id)
);
The static columns are present once per unique doc_id.
Thank you Matija, because i am newbie, it was not clear for me that i am
able to query by the partition key (not providing the clustering key),
sorry about that!
Zoltan.
On Mon, Mar 27, 2017 at 1:54 PM, Matija Gobec wrote:
> Thats exactly what I described. IN queries can be used sometimes but I
Thats exactly what I described. IN queries can be used sometimes but I
usually run parallel async as Alexander explained.
On Mon, Mar 27, 2017 at 12:08 PM, Zoltan Lorincz wrote:
> Hi Alexander,
>
> thank you for your help! I think we found the answer:
>
> CREATE TABLE documents (
> doc_id uu
Hi Alexander,
thank you for your help! I think we found the answer:
CREATE TABLE documents (
doc_id uuid,
description text,
title text,
PRIMARY KEY (doc_id)
);
CREATE TABLE nodes (
doc_id uuid,
element_id uuid,
title text,
PRIMARY KEY (doc_id, element_id)
);
We
Hi Zoltan,
you must try to avoid multi partition queries as much as possible. Instead,
use asynchronous queries to grab several partitions concurrently.
Try to send no more than ~100 queries at the same time to avoid DDOS-ing
your cluster.
This would leave you roughly with 1000+ async queries gro
Querying by (doc_id and element_id ) OR just by (element_id) is fine, but
the real question is, will it be efficient to query 100k+ primary keys in
the elements table?
e.g.
SELECT * FROM elements WHERE element_id IN (element_id1, element_id2,
element_id3, element_id100K+) ?
The elements_id
Have one table hold document metadata (doc_id, title, description, ...) and
have another table elements where partition key is doc_id and clustering
key is element_id.
Only problem here is if you need to query and/or update element just by
element_id but I don't know your queries up front.
On Sun,
Dear cassandra users,
We have the following structure in MySql:
documents->[doc_id(primary key), title, description]
elements->[element_id(primary key), doc_id(index), title, description]
Notation: table name->[column1(key or index), column2, …]
We want to transfer the data to Cassandra.
Each