XiangpengHao commented on issue #6454:
URL: https://github.com/apache/arrow-rs/issues/6454#issuecomment-2415309425
> **Cache Decompressed Pages**
Currently when evaluating a predicate, even if those columns are to be used
again, either in another predicate or the final projection mask, the
decompressed pages are not kept around. Keeping them around would have the
advantage of saving CPU cycles at the cost of potentially significant
additional memory usage, especially if the predicate is very selective.
FWIW, I quantified the memory usage vs query time with ClickBench query 21:
The query:
```sql
SELECT "SearchPhrase", MIN("URL"), COUNT(*) AS c FROM hits WHERE "URL" LIKE
'%google%' AND "SearchPhrase" <> '' GROUP BY "SearchPhrase" ORDER BY c DESC
LIMIT 10;
```
`Cache Arrow` is essentially to cache the decompressed (and decoded) data,
thus avoiding decoding Parquet twice.

As @tustvold predicted, we roughly gets 4x better performance while 4x more
memory usage.
--
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]