Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8322845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:31:17+00:00 2026-06-08T23:31:17+00:00

We have cassandra column family. each row have multiple columns. columns have name, but

  • 0

We have cassandra column family.
each row have multiple columns. columns have name, but value is empty.
if we have 5-10 row keys, how we can find column names that appear in all of these keys.
e.g.

row1: php, programming, accounting
row2: php, bookkeeping, accounting
row3: php, accounting

must return:

result: php, accounting

note we can not easily load whole row into the memory, because it may contain 1M+ columns
solution not need to be fast.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:31:20+00:00Added an answer on June 8, 2026 at 11:31 pm

    In order to do intersection of several rows, we will need to intersect two of them first, then to intersect the result with third and so on.

    Looks like in cassandra we can query the data by column names and this is relatively fast operation.

    So we first get Column Slice of 10k rows. Making list of column names (in PHP Cassa – put them in array). Then select those from second row.

    Code may be looking like this:

    $x = $cf->get($first_key, <some column slice>);
    
    $column_names = array();
    foreach(array_keys($x) as $k)
       $column_names[] = $k;
    
    $result = $cf->get($second_key, $column_slice = null, $column_names);
    
    // write result somewhere, and proceed with next slice
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have Cassandra Column Family Name as Data3, In That I Have 2 Columns
In Cassandra, I have the following Column Family: <ColumnFamily CompareWith=TimeUUIDType Name=Posts/> I'm trying to
I have inserted string and integer values into dynamic columns in a Cassandra Column
I have a counter column family in cassandra. When i try to view the
I have a schema of Row Keys 1-n. In each row there are a
I've been using cassandra-cli and have been trying to create a column family with
I have the following Cassandra configuration: <ColumnFamily CompareWith=LongType Name=MiFamily> But when I try to
I have a problem of using Cassandra, I can start it with bin/cassandra, but
I have a column family where column names are timestamps. I need to retrieve
Here's a sample of the scenario I'm facing. Say I have this column family:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.