incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <sylv...@datastax.com>
Subject Re: composite query performance depends on component ordering
Date Fri, 30 Mar 2012 13:39:18 GMT
When you do a query, there's a lot of comparison happening between
what's queries and the column names. But the composite comparator is
lazy in that when it compares two names, if the first component are
not equal, it doesn't have to compare the second one. So What's likely
happening is that in the first case you do 1 millions comparison of 8
bytes, in the latter you do 1 millions comparison of 100 bytes.

--
Sylvain

On Fri, Mar 30, 2012 at 2:30 PM, Alexandru Sicoe <adsicoe@gmail.com> wrote:
> Sender: adsicoe@gmail.com
> Subject: composite query performance depends on component ordering
> Message-Id: <CAADnm_f7xeznNMOp-fwgEy-f9uTjEPYNXdch3FXHqK6ncAggSQ@mail.gmail.com>
> Recipient: Adam.Nicholls@hl.co.uk
>
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
>
> ---------- Forwarded message ----------
> From: Alexandru Sicoe <adsicoe@gmail.com>
> To: <user@cassandra.apache.org>
> Cc:
> Date: Fri, 30 Mar 2012 14:29:47 +0200
> Subject: composite query performance depends on component ordering
> Hi guys,
>  I am consistently seeing a 20% improvement in query retrieval times if I use the composite
comparator "Timestamp:ID" instead of "ID:Timestamp" where Timestamp=Long and ID=~100 character
strings. I am retrieving all columns  (~1 million) from a single row. Why is this happening?
>
> Cheers,
> Alex
>

Mime
View raw message