Thijs van de Poll
03/22/2023, 6:36 AMD = select * from A left join B on <http://a.pk|a.pk>=<http://b.fk|b.fk> left join C on <http://a.pk|a.pk>=<http://c.fk|c.fk>
• table E: E = select <some aggregations> from D group by D.group_key
• table F: F = select *, <some expensive transformations> from E
• F gets inserted in Elasticsearch.
So what I notice is that because of the left joins, and some events arriving later than others, table F get’s updated a couple of times for the same key. Which is logical I think. However, since the transformations made to create F are expensive, it recomputes that over and over again.
For me it would be better if there was some sort of timed buffer on which events to E could arrive such that the expensive transformations do not need to be calculated on every event updating E. I am trying to understand if windows can help me out here, but I am unsure. Also, it is very important that the aggregations in E do contain all of the group elements.
Thanks!Mateusz Lewandowski
03/22/2023, 11:26 AMThijs van de Poll
03/22/2023, 11:33 AMMateusz Lewandowski
03/22/2023, 11:34 AMThijs van de Poll
03/22/2023, 11:40 AM