cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Alonso <i...@mrcalonso.com>
Subject Re: Sorting & pagination in apache cassandra 2.1
Date Fri, 15 Jan 2016 13:36:18 GMT
Hi Anuja.

Yeah, that's what he means. Before Cassandra 3.0 the modelling advice is to
have one table per query. This may sound weird from a relational
perspective, but the truth is that writes in Cassandra are very cheap, and
its better to write multiple times and have quick and easy reads than write
just once and have expensive reads.

Carlos Alonso | Software Engineer | @calonso <https://twitter.com/calonso>

On 15 January 2016 at 05:57, anuja jain <anujajain4@gmail.com> wrote:

> @Jonathan
> what do you mean by "you'll need to maintain your own materialized view
> tables"?
> does it mean we have to create new table for each query?
>
> On Wed, Jan 13, 2016 at 7:40 PM, Narendra Sharma <
> narendra.sharma@gmail.com> wrote:
>
>> In the example you gave the primary key user _ name is the row key. Since
>> the default partition is random you are getting rows in random order.
>>
>> Since each row no clustering column there is no further grouping of data.
>> Or in simple terms each row has one record and is being returned ordered by
>> column name.
>>
>> To see some meaningful ordering there should be some clustering column
>> defined.
>>
>> You can use create additional column families to maintain ordering. Or
>> use external solutions like elasticsearch.
>> On Jan 12, 2016 10:07 PM, "anuja jain" <anujajain4@gmail.com> wrote:
>>
>>> I understand the meaning of SSTable but whats the reason behind sorting
>>> the table on the basis of int columns first..
>>> Is there any data type preference in cassandra?
>>> Also What is the alternative to creating materialised views if my
>>> cassandra version is prior to 3.0 (specifically 2.1) and which is already
>>> in production.?
>>>
>>>
>>> On Wed, Jan 13, 2016 at 12:17 AM, Robert Coli <rcoli@eventbrite.com>
>>> wrote:
>>>
>>>> On Mon, Jan 11, 2016 at 11:30 PM, anuja jain <anujajain4@gmail.com>
>>>> wrote:
>>>>
>>>>> 1 more question, what does it mean by "cassandra inherently sorts
>>>>> data"?
>>>>>
>>>>
>>>> SSTable = Sorted Strings Table.
>>>>
>>>> It doesn't contain "Strings" anymore, really, but that's a hint.. :)
>>>>
>>>> =Rob
>>>>
>>>
>>>
>

Mime
View raw message