primait / event_sourcing.rs

event sourcing framework in rust
51 stars 4 forks source link

Add index for 'occured_on' column in events tables #167

Open miterst opened 1 year ago

miterst commented 1 year ago

I see that the query to reproject all the events is using the "select-all" query:

SELECT * FROM {} ORDER BY occurred_on, sequence_number ASC

Probably we need to add an index for occurred_on otherwise this can become quite slow if we have to reproject a lot of events.