|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi
Please help me in this case.I've found this site very useful. Actually it's a long detail.I had a query in Report builder data Model on one big view in report that seems like that Select column1 0,... , sum(column4),...column 10 From the_view WHERE where_clause(dynamic where clause) Group by.... UNION ALL Select column1 1,... , sum(column4),...,column 10 From the_view WHERE where_clause Group by.... UNION ALL ... till 6 times & the_view contains the sum & group by itself. so the Report is so slow.Where_clause is concatinated of several where clause that is built by package in Form builder & then passes it to report.I'v tried to transfer this query to global temporary table by inserting on that & I guses also having index on temporary table,makes faster summerize report by getting query from table instead of 6 times query on view on data model. So first I tried in report -> AFTER-PARAMETER-FORM trigger by passing this insert with execute immediate , but I realized the :where_clause is null (by srw.message) although it works in data model by &where_clause. Then I switched to form & try again by WHEN-BUTTON-PRESSED in Forms with FORMS_DDL like as following , but it dosent work . FORMS_DDL('INSERT into tbl_global_temporary select ..(the select I mentioned before)'||Where_Clause||'group by ... second query after union all'||Where_Clause||..... where_clause is made in package & returned by function to WHEN-BUTTON-PRESSED. I can see Where_clause correctly by message & insert this ddl in sqlplus but in forms nothing does insert into global temporary table.I should mentioned the table is created by preserve command.I tried again by putting all in sql_text Varchar2(5000) but I got Ora-00972: identifier too long. Please help me what to do? I'm realy confused. first of all I tried to tune the basic view by defining indexex. the cost is pretty good & it's used all indexes. then I tried to tune the query in data model but it wasnt sophisticated. then I decided to put that all in global temporary table. unfortunately all my effors havent had any good resualt.I'm not a good developer ( actualy I'm DBA) but I have to change this report. I'm confused about hoe to deal with this long where_clause & insertion in report or form. regards Niaz |
|
#2
|
|||
|
|||
|
Which version of Oracle database you are using? If you are using Oracle8i or later version then create Materialized view not the simple view, an example is given below:
CREATE MATERIALIZED VIEW <view_name> BUILD IMMEDIATE REFRESH FAST ON COMMIT AS <write your query> / |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > FORMS_DDL (INSERT) dosent work |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|