Filtering issues in queries

If you think that something doesn't work in Aware IM post your message here
Post Reply
rocketman
Posts: 1239
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Filtering issues in queries

Post by rocketman »

Scenario:

A query initially prompts the user for two date (from and to) so eg from 01/07/2018 to 20/07/2018
The query runs and the grid is correctly populated
I set a filter on a column which holds the day number so daynum= 1 .... All OK
I set a second OR filter on the same column so daynum = 1 OR daynum=7

The list filters correctly for Saturday and Sunday ( 1 or 7) BUT suddenly I have all Saturday and Sunday entries going back to 2010

Now, I didn't ask for all that data initially but the speed of response when changing the filters would indicate that behind the scenes, AIM has pulled in the entire table (which contains over 60,000 records) which to my mind is extremely wasteful of resources in the Java engine

So point 1 - the second set of results shouldn't have happened anyway - I still only want the data between the initial prompted for dates

Point 2 - how come it's pulling all of the BO into memory? (if indeed it is - on this point I'm not sure what is happening)

I should add that if I re-apply the date filter to the date column, I get the results I need ..... but what a pain in the b###

The daynum field is not a calculated field in the query. This is calculated by a rule when new records are created - it was the only way to do it in V5.9
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Post Reply