Thanks,
Thiru.
WantedToBeDBA.
Example:
CREATE TABLE T(c1 varchar(10), uc1 GENERATED ALWAYS AS (UPPER(c1)));
CREATE INDEX i1 ON T(uc1);
INSERT INTO T(c1) VALUES ('hello'), ('world');
SELECT c1 FROM T WHERE UPPER(c1) = 'HELLO';
Cheers
Serge
Cheers
Serge
select max(numberic column) from tablename where <conditions>
Thiru
WantedToBeDBA.
Cheers
Serge
Cheers
Serge
I'm not sure I'm following you. modifying 1 row in the base tqble will
lock only one row in the MQT.
When you say 'per group', do you mean the group in MQT definition?
BTW, using incremental refresh, we can join a refresh-deferred MQT with
its staging table. Since all the modifications insert to the staging
table, there is no additional lock contention. As long as both the MQT
and the staging table are small, the join is a snap - you get the
current information real quick.Naturally one need to refresh
frequently, otherwise the join slows down.
Although this approach works, it's a little bit tricky, so I'd prefer
index covering most of the time
Cheers
Serge
collide
.. <<
Yes, of course, I would completely agree. However, sometimes it is not
easy to get rid of collisions - whatever GROUP BY we try to use, some
statement will eventually touch a row in every group, effectively
locking the whole table.
BTW, in certain cases we do want to serialize and lock contention on
MQT is OK