I have an application (which I'm only the user of, i.e. I cannot change it, but I do have control over the database) that performs relatively simple, but potentially very frequent concurrent look-ups on a table using prepared statements like the following on a DB2 LUW 10.5 system:
SELECT A, B, C FROM SCHEMA.TABLENAME WHERE D = ?
Particularly it does not seem to apply uncommitted read isolation. There are no updates on the table while the application reads from it and each read usually only returns a single row.
My questions are:
- Can I assume there can be performance improvements by adding
WITH URto the statement?
- If so: Can I expect similar performance improvements by creating a view like
CREATE VIEW VIEWNAME AS SELECT * FROM SCHEMA.TABLENAME WITH URand point the application at that view instead of the original table?
Or more generally: Can I use a view (or other DB-side facilities) to trick the application into using uncommitted read, provided that results in better performance in my scenario?