Performance of cloud bigtable row filtering

Viewed 1407

What is happening on the bigtable server when you issue a prefix scan with row filtering?

Say you perform a prefix scan using filtering and as time goes on, more rows end up getting filtered out. I'm wondering if performance becomes degraded due to filtering.

Is Cloud Bigtable efficient at doing prefix scans that need to filter out lots of rows?

2 Answers

Is Cloud Bigtable efficient at doing prefix scans that need to filter out lots of rows?

In short no, it is not efficient. To make your query more efficient, you can promote the field(s) you are using in the query: move it(them) from the column data into the row key.

The answers to your questions are in the document

https://cloud.google.com/bigtable/docs/schema-design

for example:

To get the best performance out of Cloud Bigtable, it's essential to think carefully about how you compose your row key. That's because the most efficient Cloud Bigtable queries use the row key, a row key prefix, or a row range to retrieve the data. Other types of queries trigger a full table scan, which is much less efficient. By choosing the correct row key now, you can avoid a painful data-migration process later.

Related