On 17/08/2022 07:00, Red S wrote:
I would encourage you to go through the bql documentation, and specifically understand querying transactions vs. postings (FROM vs WHERE in bql terminology).

The capability to use the FROM clause of a BQL query to filter ledger entries is an unfortunate historical accident. There is no fundamental difference between the expression that are used in the FROM clause and in the WHERE clause, except for which table columns are accessible in the two: the FROM clause has access only to columns derived from transactions properties, while the WHERE clause has also access to columns derived from posting properties:

  SELECT * FROM date = 2022

or

  SELECT * WHERE date = 2022

do exactly the same thing.

Indeed in beanquery (the project spun off from beancoiunt to evolve bean-query faster) the FROM clause is interpreted rewriting it into a WHERE clause. This halves the memory usage and the number of iterations over the data set required to interpret the query.

The support for filter expression in the FROM clause will need to be deprecated and eventually removed, thus I recommend to move your expressions to the WHERE clause.

Cheers,
Dan

--
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/5da2ba38-96a4-204f-d94a-e61a65d3d2ba%40grinta.net.

Reply via email to