cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyril Auburtin <cyril.aubur...@gmail.com>
Subject Re: primary keys query
Date Wed, 16 May 2012 08:23:17 GMT
tx was looking at http://code.google.com/p/javageomodel/ too

2012/5/14 aaron morton <aaron@thelastpickle.com>

> So it seems it's not a good idea, to use Cassandra like that?
>
> Right. It's basically a table scan.
>
> Here is some background on the approach simple geo took to using
> Cassandra...
> http://www.readwriteweb.com/cloud/2011/02/video-simplegeo-cassandra.php
>
> Also PostGis for Postgress seems popular http://postgis.refractions.net/
>
> Hope that helps.
>
>
>   -----------------
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 12/05/2012, at 4:23 AM, cyril auburtin wrote:
>
> I was thinking of a CF with many many rows with id, type, latitude and
> longitude (indexed), and do geolocation queries: type=all and lat < 43 and
> lat >42.9 and lon < 7.3 and lon > 7.2
>
> where all rows have type=all
> (at least try how Cassandra deals with that)
> So it seems it's not a good idea, to use Cassandra like that?
>
> There's also the possibly to do in parallel, other CF, with latitude in
> rows, that will be sorted, so an indexed query can give us the right
> latidue range, and then just query with logitude < and >
>
> What do you think of that
>
> thanks
>
> 2012/5/11 Dave Brosius <dbrosius@mebigfatguy.com>
>
>> Inequalities on secondary indices are always done in memory, so without
>> at least one EQ on another secondary index you will be loading every row in
>> the database, which with a massive database isn't a good idea. So by
>> requiring at least one EQ on an index, you hopefully limit the set of rows
>> that need to be read into memory to a manageable size. Although obviously
>> you can still get into trouble with that as well.
>>
>>
>>
>>
>> On 05/11/2012 09:39 AM, cyril auburtin wrote:
>>
>>> Sorry for askign that
>>> but Why is it necessary to always have at least one EQ comparison
>>>
>>> [default@Keyspace1] get test where birth_year>1985;
>>>    No indexed columns present in index clause with operator EQ
>>>
>>> It oblige to have one dummy indexed column, to do this query
>>>
>>> [default@Keyspace1] get test where tag=sea and birth_year>1985;
>>> -------------------
>>> RowKey: sam
>>> => (column=birth_year, value=1988, timestamp=1336742346059000)
>>>
>>>
>>>
>>
>
>

Mime
View raw message