One property crashes IRIS query
Hello,
One of our clients has a 'Notes' class with over 3 million records. We have a report that pulls data from this table that was taking about an hour to run. Our test environment (which has a copy of the production database) runs the same report query in 1 second.
We attempted to purge and rebuild indices which made an improvement (down to 15 minutes) but still not great.
Next we ran tune table through the Mgmt Portal and it timed out. I then ran tune table via the Terminal and it finished in a couple minutes. Suddenly our application was hanging anywhere this table was referenced. We realized there was one boolean property in the WHERE clause causing the problem. Our only recourse was to remove the offending property from the WHERE clause and filter on that value within the code loop instead. That works fine but we'd still like to know what is going on. Has anyone seen behavior like this and if so how did you deal with it? Thanks very much!!
Comments
Can you share the query plan?
What mode are you running in the query in(Logical/ODBC/Display)
This sounds like the tune table messed up the table statistics. I would look at the table statistics for that boolean field. Also i would open a support ticket with WRC on this.
Hi Jerry,
Without knowing more about the specific query plan and IRIS setup it would be hard to know what's going on - I would highly recommend reaching out to the WRC about this if you are able. I will note that TUNE TABLE has had significant functionality improvements since IRIS version 2021.2 (see https://community.intersystems.com/post/20212-sql-feature-spotlight-sma…) , it's possible you are missing a bug fix; again WRC would be the best point of contact. Best of luck!