afs commented on issue #3021:
URL: https://github.com/apache/jena/issues/3021#issuecomment-2669737069

   Hi @mpagni12 
   
   Looks like the optimizer is missing the best filter placement.
   
   Could you try the following 2 patterns which add `{ }` to hint to the 
optimizer:
   
   ```
                   . . .
                   WHERE{
                     {
                       BIND( reconx:vmh_Recon AS ?mnet ) # fix a model here to 
focus the results 
                       ?mnet 
reconx:reac/reconx:equaSource/reconx:part/reconx:spec/reconx:chem ?chem_1 .
                     }
                       ?mnxm mnx:chemXref ?chem_1, ?chem_2
                       FILTER( STR( ?chem_1 ) < STR( ?chem_2 ))
                   }  
                   . . .
   ```
   and also 
   ```
                   . . .
                   WHERE{
                   {
                       BIND( reconx:vmh_Recon AS ?mnet ) # fix a model here to 
focus the results 
                       ?mnet 
reconx:reac/reconx:equaSource/reconx:part/reconx:spec/reconx:chem ?chem_1 .
                     {
                       ?mnxm mnx:chemXref ?chem_1, ?chem_2
                       FILTER( STR( ?chem_1 ) < STR( ?chem_2 ))
                     }
                   }  
                   . . .
   ```
   
   Andy
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to