Re: How to query the database?

2019-10-01 Thread cilz
Hi Alex, Thanks very much for helping. So far I've done the mods to the database rel you suggested and I have this query: (? (select (@A) ((year +Agenda 2019) (week +Agenda 32) (same 2019 @A year) (same 32 @A week)) ) which works and gives me results like these: @A = {1643} ... @A = {1731}

Re: How to query the database?

2019-10-01 Thread Alexander Burger
Hi Eric, > (class +Agenda +Entity) > (rel id (+Key +Number)) > (rel date (+date)) > (rel year (+Idx +Number)) > (rel monthnum (+Idx +Number)) > (rel monthtxt (+Idx +String)) > (rel week (+Idx +Number)) > (rel status (+Idx +String)) '+Idx' is not suitable for numbers, as it builds an index of

Re: How to query the database?

2019-10-01 Thread Alexander Burger
On Tue, Oct 01, 2019 at 09:24:33AM +0200, Alexander Burger wrote: > (rel year (+Ref +Number)) > ... > (rel week (+Ref +Number)) An useful optimization in this case would be using an '+Aux' index (rel year (+Aux +Ref +Number) (week)) ... (rel week (+Ref +Number)) In this way, the

Re: How to query the database?

2019-10-01 Thread Alexander Burger
Hi Eric, > So far I've done the mods to the database rel you suggested and I have this > query: > (? (select (@A) ((year +Agenda 2019) (week +Agenda 32) (same 2019 @A year) > (same 32 @A week)) ) > which works and gives me results like these: > @A = {1643} > ... > @A = {1731} > > Now, is there