Search code examples
apache-kafkaksqldb

ksqldb: ROWTIME criteria and timestamp index


If I query a stream using ROWTIME criteria, will ksqldb use broker's timestamp index ?

Sample query:

select ROWTIME, eventType from MY_EVENTS where ROWTIME > 1688635908983 limit 10

I tried a query with ROWTIME criteria but, have no way of checking if the timestamp index was used.

Explain plan didn't mention anything about using timestamp index.


Solution

  • It does not use the brokers timestamp index.

    Depending on your auto.offset.reset config, the topic would be consumer either from beginning (or end) and each record would be pushed through the query.