Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query rewrite option is not working

Ram_AAug 10 2020 — edited Aug 17 2020

Hi Experts,

Query rewrite option is not working.

I have created the following materialized view  with "enable query rewrite option".

ALTER SESSION SET QUERY_REWRITE_ENABLED = TRUE;

create materialized VIEW mv12

REFRESH COMPLETE ON demand

enable query rewrite

as

select d.deptno,sum(e.sal) from emp e,dept d

where e.deptno=d.deptno

GROUP BY d.deptno;

The query is using tables instead of MVIEW. Could you please help me.

Why it'snot using MVIEW.

select d.deptno,sum(e.sal) from emp e,dept d

where e.deptno=d.deptno

and d.deptno=10

GROUP BY d.deptno;

Thanks in advance.

This post has been answered by Jonathan Lewis on Aug 10 2020
Jump to Answer

Comments

SubOptimal

The link to Oracle Javamagazine is broken. It point to `oracle.com/java` instead of `oracle.com/javamagazine`.

user619767

No link to source on GitHub or Kenai?

Pradeep Y

Hi Annie,

I have developed source code based on this document using usb4java and it is working fine as a standalone class.

I integrated this code into another application as a signed applet jar along with other supporting files. Here weight from weighing scale is also reading as expected.

My problem is if weight on weighing scale is changed, to update this change it is taking 20-30 sec. So, a user has to wait for some time to get updated weight.

I verified code and found below code is reading same weight in this period.

     received = pipe.syncSubmit(data);

Here data size is 8 bytes and receiving 6 bytes.

When I looped this statement alone for 400 time it is retrieving update weight in 10 sec and also there are performance issues like browser is hanged for almost 10-15 sec and applet is also hanging.

Please suggest me on resolving this issue.

Thanks,

Y Pradeep

Fantazma

Thank You Annie.

User_I95HU

DSCN0010.jpg

1 - 5

Post Details

Added on Aug 10 2020
5 comments
983 views