Table Index

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Table Index

Vijay-19-3
Hi,

I think this is a very simple question and might have been asked before.... but couldn't find answer elsewhere.... Sorry if it is repetitive. We are trying to use Cassandre and i am stuck in the datamodel.....

Do we have indexed table? i see some classes but dont know what they will be used for.... Is the index tell Casandra where exactly the column and the value in the column family is located? Say i do a query for which i dont have the rowid, i am looking for and i want to get a value of a coumn with a specific value.... will the secoundry index help on it? or should i use lucene to do that?

What exactly the index will do and help on? 

Thanks in advance.... May be i am confused because my understanding is completely wrong abt the index.

Regards,
</VJ>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Index

Sandeep Tata
Cassandra does not currently have secondary indexes.

The indexing you see in the code is just a mechanism to get at the
(known) keys and columns quickly.

On Mon, Jul 6, 2009 at 3:59 PM, Vijay<[hidden email]> wrote:

> Hi,
> I think this is a very simple question and might have been asked before....
> but couldn't find answer elsewhere.... Sorry if it is repetitive. We are
> trying to use Cassandre and i am stuck in the datamodel.....
> Do we have indexed table? i see some classes but dont know what they will be
> used for.... Is the index tell Casandra where exactly the column and the
> value in the column family is located? Say i do a query for which i dont
> have the rowid, i am looking for and i want to get a value of a coumn with a
> specific value.... will the secoundry index help on it? or should i use
> lucene to do that?
> What exactly the index will do and help on?
> Thanks in advance.... May be i am confused because my understanding is
> completely wrong abt the index.
> Regards,
> </VJ>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Index

Vijay-19-3
Thanks Sandeep for your response,

but how do i get to the data, when i dont know the rowid? i have a unique value which i am querying for in the table.... but i dont know the ROWNAME..... Is there a way? or should i just create another table and store the name in there?

"The indexing you see in the code is just a mechanism to get at the
(known) keys and columns quickly." 
I saw your presentation in NOSQL meet in which you said something about supercoulmn that was intresting.... but in your presentation rowid was the usernames of who intracted? 

The reason i am asking is i have multiple columns which a user can query on like UID, URL, TAGS (all of them are unique).... but how can i get to them without getting stuck with the rowid? coz rowid can be one of those.... and the user at any time can know only one....

Thanks for your time....

Regards,
</VJ>



On Mon, Jul 6, 2009 at 4:17 PM, Sandeep Tata <[hidden email]> wrote:
Cassandra does not currently have secondary indexes.

The indexing you see in the code is just a mechanism to get at the
(known) keys and columns quickly.

On Mon, Jul 6, 2009 at 3:59 PM, Vijay<[hidden email]> wrote:
> Hi,
> I think this is a very simple question and might have been asked before....
> but couldn't find answer elsewhere.... Sorry if it is repetitive. We are
> trying to use Cassandre and i am stuck in the datamodel.....
> Do we have indexed table? i see some classes but dont know what they will be
> used for.... Is the index tell Casandra where exactly the column and the
> value in the column family is located? Say i do a query for which i dont
> have the rowid, i am looking for and i want to get a value of a coumn with a
> specific value.... will the secoundry index help on it? or should i use
> lucene to do that?
> What exactly the index will do and help on?
> Thanks in advance.... May be i am confused because my understanding is
> completely wrong abt the index.
> Regards,
> </VJ>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Index

Mark Robson
2009/7/7 Vijay <[hidden email]>
The reason i am asking is i have multiple columns which a user can query on like UID, URL, TAGS (all of them are unique).... but how can i get to them without getting stuck with the rowid? coz rowid can be one of those.... and the user at any time can know only one....

You have to create your own index as another table, and range scan that to get the keys for your main table. It's not pretty.

But in any case, that's what a (traditional) database really does internally anyway, it's just a bit more automatic.

I find the awkward bit is cleaning up cross-references, when you want to throw a row out of the main table, each of its indexes need to be cleaned up by a separate delete operation.

Mark
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Table Index

Vijay-19-3
I see what you mean.... Thanks for the information Mark.... sounds to me like distributed lucene is the way to go in that case.

Regards,
</VJ>



On Mon, Jul 6, 2009 at 11:00 PM, Mark Robson <[hidden email]> wrote:
I find the awkward bit is cleaning up cross-references, when you want to throw a row out of the main table, each of its indexes need to be cleaned up by a separate delete operation.

Loading...