title: What does "PER PARTITION LIMIT" means in cql query in cassandra?
body: <p>I have a scylla table as shown below:</p>
  
  <pre><code>cqlsh:sampleks&gt; describe table test;
  
  CREATE TABLE test (
      client_id int,
      when timestamp,
      process_ids list&lt;int&gt;,
      md text,
      PRIMARY KEY (client_id, when) ) WITH CLUSTERING ORDER BY (when DESC)
      AND bloom_filter_fp_chance = 0.01
      AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
      AND comment = ''
      AND compaction = {'class': 'TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'DAYS'}
      AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
      AND crc_check_chance = 1.0
      AND dclocal_read_repair_chance = 0.1
      AND default_time_to_live = 0
      AND gc_grace_seconds = 172800
      AND max_index_interval = 1024
      AND memtable_flush_period_in_ms = 0
      AND min_index_interval = 128
      AND read_repair_chance = 0.0
      AND speculative_retry = '99.0PERCENTILE';
  </code></pre>
  
  <p>And I see this is how we are querying it. It's been a long time I worked on cassandra so this <code>PER PARTITION LIMIT</code> is new thing to me (looks like recently added). Can someone explain what does this do with some example in a layman language? I couldn't find any good doc on that which explains easily.</p>
  
  <pre><code>SELECT * FROM test WHERE client_id IN ? PER PARTITION LIMIT 1;
  </code></pre>