title: Cassandra query making - Cannot execute this query as it might involve data filtering and thus may have unpredictable performance
body: <p>I'd the following Cassandra Model:-</p>
  
  <pre><code>class Automobile(Model):
      manufacturer = columns.Text(primary_key=True)
      year = columns.Integer(index=True)
      model = columns.Text(index=True)
      price = columns.Decimal(index=True)
  </code></pre>
  
  <p>I needed the following queries:-</p>
  
  <pre><code>q = Automobile.objects.filter(manufacturer='Tesla')
  q = Automobile.objects.filter(year='something')
  q = Automobile.objects.filter(model='something')
  q = Automobile.objects.filter(price='something')
  </code></pre>
  
  <p>These all were working fine, until i wanted multiple column filtering, ie when I tried</p>
  
  <pre><code>q = Automobile.objects.filter(manufacturer='Tesla',year='2013')
  </code></pre>
  
  <p>it throws an error saying <code>Cannot execute this query as it might involve data filtering and thus may have unpredictable performance.</code></p>
  
  <p>I rewrote the query with <code>allowed_filtering</code>, but this is not an optimal solution.</p>
  
  <p>Then upon reading more, I edited my model as follow:-</p>
  
  <pre><code>class Automobile(Model):
      manufacturer = columns.Text(primary_key=True)
      year = columns.Integer(primary_key=True)
      model = columns.Text(primary_key=True)
      price = columns.Decimal()
  </code></pre>
  
  <p>With this I was able to filter multiple coulms as well, without any warning.</p>
  
  <p>When I did <code>DESCRIBE TABLE automobile</code>, it shows this creates composite key <code>PRIMARY KEY ((manufacturer), year, model)</code>. </p>
  
  <p><strong>So, my question is what if I declare every attribute as primary key?</strong> Is there any problem with this, since I'll be able to filter multiple columns as well.</p>
  
  <p>This is just a small model. What if I had a model such as:-</p>
  
  <pre><code>class UserProfile(Model):
      id = columns.UUID(primary_key=True, default=uuid.uuid4)
      model = columns.Text()
      msisdn = columns.Text(index=True)
      gender = columns.Text(index=True)
      imei1 = columns.Set(columns.Text)
      circle = columns.Text(index=True)
      epoch = columns.DateTime(index=True)
      cellid = columns.Text(index=True)
      lacid = columns.Text(index=True)
      mcc = columns.Text(index=True)
      mnc = columns.Text(index=True)
      installed_apps = columns.Set(columns.Text)
      otp = columns.Text(index=True)
      regtype = columns.Text(index=True)
      ctype = columns.Text(index=True)
      operator = columns.Text(index=True)
      dob = columns.DateTime(index=True)
      jsonver = columns.Text(index=True)
  </code></pre>
  
  <p>and if I declare every attribute as PK, is there any problem with this?</p>