Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Materiazed View Sorting cost increasing
Sorting is taking time in Materialized view.
You can see below, here sorting is taking time. Is there any way I can
stop sorting or make it fast.
SQL> CREATE MATERIALIZED VIEW "MCC_CATALOG_2"."REL_SYS_NAME_IPPSYSNAM"
2 BUILD IMMEDIATE
3 REFRESH FORCE with rowid
4 ENABLE QUERY REWRITE
5 AS
6 SELECT IPP_SYSTEM_NAME FROM MCC_CATALOG_2.RELEASE_SYSTEM_NAME
where IPP_SYSTEM_NAME is not null;
Materialized view created.
Elapsed: 00:00:10.09
SQL> explain plan for
2 select distinct IPP_SYSTEM_NAME FROM
MCC_CATALOG_2.RELEASE_SYSTEM_NAME;
Explained.
Elapsed: 00:00:00.00
SQL> @?\rdbms\admin\utlxplp.sql
PLAN_TABLE_OUTPUT
Note: cpu costing is off
10 rows selected.
SQL> explain plan for
2 select distinct IPP_SYSTEM_NAME FROM
MCC_CATALOG_2.RELEASE_SYSTEM_NAME where IPP_SYSTEM_NAME is not null;
Explained.
Elapsed: 00:00:00.06
SQL> @?\rdbms\admin\utlxplp.sql
PLAN_TABLE_OUTPUT
9M| | 2389 |9M| 25M| 2389 |
| 1 | SORT UNIQUE | | 475K|
Note: cpu costing is off
10 rows selected.
Elapsed: 00:00:00.00 Received on Sun Mar 11 2007 - 23:48:01 CDT
![]() |
![]() |