You will probably not find any AWARE query will speed up by any measurable amount, since:
Aware queries are tied to only 1 BO (which is 1 SQL table) so you will not find a huge speed increase although you can save some sorting time, etc. If you DO have any aware queries that take more than 1-2 seconds to run, then there is some issue with the network / sql configuration / disks, etc.
In my example there were multiple tables joined together and one of them was a group by (Select custno, sum(invoiceamount) as totalOwed group by custno)
This was just one of the tables being used in the query, and with just the single field the query optimizer picked a poor plan which required it to pass over the table multiple times. By having the actual data clustered (ordered by) the customer in invoice # order, it was smart enough to just merge this table into the other tables.
Also, you say "The customer attribute on your invoice object I take it is a single reference and would be automatically indexed by Aware ". This is incorrect. Aware will create an index (ok, constraint, so almost the same thing) on the ID field and will create an index on any field where you select index. Many back end databases will create indexes on columns that are used often in queries. (that is why you can run a query a few times and it is slow, then like magic, it speeds up. I am attaching a screen shot showing the indexes on my Invoices table. Notice that 3 of them have funny numeric names starting with "I". These are the system created ones, The last one, "idx_invoices_shipto" is the one I created with 2 columns.
did I confuse you? and I am working with MSSQL, however the principals are similar between MSSQL and MYSQL (and with MSSQL now free and now running on Linux), I am not sure why most peeps have not converted over to it.)
Bruce

