wjohnsonbynder commented on issue #105:
URL: 
https://github.com/apache/incubator-pekko-persistence-jdbc/issues/105#issuecomment-1934521848

   Not sure I understand.
   
   This subquery currently has nothing on the where clause other than deleted = 
false
   
   select "deleted" as x4, "meta_ser_id" as x14, "meta_ser_manifest" as x15, 
"sequence_number" as x6, "writer" as x7, "event_ser_manifest" as x12, 
"write_timestamp" as x8, "persistence_id" as x5, "adapter_manifest" as x9, 
"ordering" as x3, "event_payload" as x10, "event_ser_id" as x11, "meta_payload" 
as x13 from "event_journal" where "deleted" = false
   
   This part of the parent where clause only pertains to the subquery.
   ((x2.x3 > ?) and (x2.x3 <= ?))
   
   This is the ordering field. Moving this to the subquery since it is whole 
contained to that table means only a portion of event-journal is selected. 
Right now the subquery must execute and it returns the entire event-journal. 
Limiting the results from the subquery instead of doing it in the parent stops 
the full scan of the journal


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to