Roiocam commented on issue #240: URL: https://github.com/apache/pekko-persistence-cassandra/issues/240#issuecomment-2443248765
> Can we just use max? > > ``` > SELECT max(sequence_nr) FROM $tableName WHERE > persistence_id = ? AND > partition_nr = ?` > ``` > > This stackoverflow answer says that Cassandra supports it. [stackoverflow.com/questions/41717163/query-to-select-max-value-of-a-column-using-max-using-cassandra](https://stackoverflow.com/questions/41717163/query-to-select-max-value-of-a-column-using-max-using-cassandra) It will ignore the null value, but still sorting a large set. https://stackoverflow.com/questions/34246403/performance-of-max-vs-order-by-desc-limit-1 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org