Follower reads on specific tables

Can we enable Follower reads on just some specific tables?
https://docs.yugabyte.com/latest/explore/follower-reads/linux/ following this seem no?

An example for this is for some configuration tables with rarely update.

Nguyen,

Follower reads can be enabled at the application level for all YCQL tables. This is done by setting ConsistencyLevel.ONE on your prepared SELECT statement. See the following code fragment from our yb-sample-apps:

  protected PreparedStatement getPreparedSelect(String selectStmt, boolean localReads)  {
    if (preparedSelect == null) {
      synchronized (prepareInitLock) {
        if (preparedSelect == null) {
          // Create the prepared statement object.
          preparedSelect = getCassandraClient().prepare(selectStmt);
          if (localReads) {
            LOG.debug("Doing local reads");
            preparedSelect.setConsistencyLevel(ConsistencyLevel.ONE);
          }
        }
      }
    }
    return preparedSelect;
1 Like