Quote:
|
Originally Posted by dav1mo
The index eats up some space, but the query performs very well.
|
Be aware that the index also gets updated on every single INSERT, UPDATE, or DELETE in the base table (PERSON in your case). If this is substantial, those database accesses will be negatively impacted by that index. As always, there's a trade-off to make or a price to pay!
Actually, there *is* an other option here which improves your UPDATE query (when you include the "AND SYNC = 'N'") without the need of creating an index: make the table partitioned, with two partitions, where SYNC is the partitioning column.
(Depending on your DB2 version and platform, this possibility could not yet be available.)