Description
I referred to the official Trino document
my configuration is as follows:
spill-enabled=true
spiller-spill-path=/tmp/spill
query.max-memory=800MB
query.max-memory-per-node=100MB
When I use Order by
or Aggregations
operations. I see that the spill is activated. as shown in the following image.
When I use the join operator, it does not successfully spill as before, but instead returns the following error.
io.trino.ExceededMemoryLimitException: Query exceeded per-node memory limit of 100MB [Allocated: 99.37MB, Delta: 956.92kB, Top Consumers: {HashBuilderOperator=98.16MB, LazyOutputBuffer=1.20MB, PagePartitioner=3.05kB}] at io.trino.ExceededMemoryLimitException.exceededLocalUserMemoryLimit(ExceededMemoryLimitException.java:40) at io.trino.memory.QueryContext.enforceUserMemoryLimit(QueryContext.java:330) at io.trino.memory.QueryContext.updateUserMemory(QueryContext.java:165) at io.trino.memory.QueryContext.lambda$addTaskContext$0(QueryContext.java:250) at io.trino.memory.QueryContext$QueryMemoryReservationHandler.reserveMemory(QueryContext.java:311) at io.trino.memory.context.RootAggregatedMemoryContext.updateBytes(RootAggregatedMemoryContext.java:37) at io.trino.memory.context.ChildAggregatedMemoryContext.updateBytes(ChildAggregatedMemoryContext.java:38)
My sql like this:
select * from <table1> t1 inner join <table2> t2 on t1.column1 = t2.column1 and t1.column2 = t2.column2;
I wonder know what caused the join operation unable to spill. Is there any parameter or method to resolve.