Refresh specific partition of materialized table
DB version 11.2.0.3 on Linux
We have several partitioned materlialized views. Partitioning key is mandator. We would like to refresh partition independently, e.g. refresh all materialized view partitions for mandator GB (e.g. refresh mandator GB only even if there are also other partitions belonging to other mndators that are stale).
Is it possible to refresh partitions only? I'm aware of partition change tracking but I don't think/know that it is possible to refresh a specific partition.
We have several partitioned materlialized views. Partitioning key is mandator. We would like to refresh partition independently, e.g. refresh all materialized view partitions for mandator GB (e.g. refresh mandator GB only even if there are also other partitions belonging to other mndators that are stale).
Is it possible to refresh partitions only? I'm aware of partition change tracking but I don't think/know that it is possible to refresh a specific partition.
No - Oracle's refresh process can not be used to refresh a specific partition.
But there is a workaround if you handle the refreshes yourself.
WARNING - this is NOT for the faint of heart. I don't recommend using the approach unless it is absolutely necessary. Make sure you FULLY understand all of the issues involved before using this technique in production.
Basically you:
1. create a pre-built partitioned table to base the MV on
2. create an MV using the pre-built table
3. create an ordinary temp/work table with the same structure as the MV
4. populate the temp/work table with the new (refreshed) partition data
5. execute an EXCHANGE PARTITION of the temp/work table with the 'specific' partition you want to refresh
Arup Nanda has a writeup with a very simple example of how the process basically works. You will need to modify it for your use case.
http://arup.blogspot.com/2010/04/online-materialized-view-complete.html
Similar Messages
-
How to create index on specific partition table?
Hi Experts,
we created 4 partitions on table .
Table Name : test
partitions : Test_prt1
Test_prt2
Test_prt3
Test_prt4
Our requiremnt create the index on specific partition (ex : Test_prt2) only.Creating Partitioned Tables and Indexes
http://technet.microsoft.com/en-us/library/ms187526(v=sql.105).aspx
you can create a aligned index, the index will be spread over the filegroups
Create NonClustered Index IX_orders_aligned
On dbo.orders(order_id)
On test_monthlyDateRange_ps(orderDate);
OR
Unaligned parition, you can create index on any filegroups
Create NonClustered Index IX_orders_unpartitioned
On dbo.orders(order_id)
On [Test_prt2_FileGroup];
For more information refer the below link
http://sqlfool.com/2008/12/indexing-for-partitioned-tables/
Or
You can try Creating a filtered index (I've not tried it though)
http://www.mssqltips.com/sqlservertip/1785/sql-server-filtered-indexes-what-they-are-how-to-use-and-performance-advantages/
--Prashanth -
How to exp a specific partition data from a partitioned table
Thanks in advance.
Is is possible to export a specific partition data from a partitioned table? If so Please describe how with an example. Thank You.You would specify a partition with the table_name:partition_name syntax at the TABLES parameter.
See examples at
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#CEGCJABJ -
Hello,
What is the difference when updating a table specifying a specific partition compare to not specifying a specific partition?
Does specifing a specific partition while doing an update only update values within that specific partition?
For example:
update tab_abc partition (nov_2013)
set col_abc = 'ABC';
vs.
update tab_abc
set col_abc='ABC';
Thank you.Yes, but better to do this:
update tab_abc
set col_abc = 'ABC'
where date_key >= to_date('01-NOV-2013','DD-MON-YYYY')
and date_key < to_date('01-DEC-2013','DD-MON-YYYY')
(where date_key is the column your table is partitioned on)
Now your code is totally unaware that the table is partitioned but it can still use partition pruning.
And your code won't break if the partitioning strategy changes (which it certainly can). -
I am curious to hear techniques for partitioning a fact table with OWB. I know HOW to setup the partitioning for the table, but what I am curious about is what type of partitioning everyone is suggesting. Take the following example...Lets say we have a sales transaction fact table. It has dimensions of Date, Product, and Store. An immediate partitioning idea is to partition the table by month. But my curiosity arises in the method used to partition the fact table. There is no longer a true date field in the fact table to do range partitioning on. And hash partitioning will not distribute the records by month.
One example I found was to "code" the surrogate key in the date dimension so that it was created in the following manner "YYYYMMDD". Then you could use the range partitioning based on values of the key in the fact table less than 20040200 for Jan. 2004, less than 20040300 for Feb. 2004, and so on.
Is this a good idea?Jason,
In general, obviously, query performance and scaleability benefit from partitioning. Rather than hitting the entire table upon retrieving data, you would only hit a part of the table. There are two main strategies to identify what partitioning strategy to choose:
1) Users always query specific parts of the data (e.g. data from a particular month) in which case it makes sense for the part to be the size of the partition. If your end users often query by month or compare data on a month-by-month basis, then partitioning by month may well be the right strategy.
2) Improve data loading speed by creating partitions. The database supports partion exchange loading, supported by Warehouse Builder as well, which enables you to swap out a temporary table and a partition at once. In general, your load frequency then decides your partitioning strategy: if you load on a daily basis, perhaps you want daily partions. Beware that for Warehouse Builder to use the partition exchange loading feature you will have to have a date field in the fact table, so you would change the time dimension.
In general, your suggestion for the generated surrogate key would work.
Thanks,
Mark. -
Targeting Specific Partition in OWB.
Hi ,
I have a partition table with the range partition, partition based on the month.
Here this parition table is my target table and load strategy is update / insert
Can any body help me that how can I point my mapping, to target the specific partition (This partition depends on load day so I can not hard code it either) only instead of whole table ? This is required because of performance probles...
Have a great time....Hi,
look at OWB PEL feature and/or ALTER TABLE ... EXCHANGE PARTITION (use it in custom procedures)
Regards,
Oleg -
Issue with MV fast refresh off of an materialized
I have a materialized view that does not have a primary key (I am NOT allowed to change this).
So I created a materialized view log using rowid. I am trying to create another materialized view that fast refreshes off of this materialized view. I get the following error. any way to make this work?
1 create materialized view my_mv
2 build immediate
3 refresh fast
4 with rowid
5* as select * from owner.my_orig_mv
SQLPLUS> /
as select * from owner.my_orig_mv
ERROR at line 5:
ORA-12053: this is not a valid nested materialized viewthank you for the doc, but I am confused. The first thing it says is that I need to use a rowid to refresh which is what I am doing. I don't know why this won't fast refresh.
the first materialized view is not a join view or complex. it is a straight select from a table.
Edited by: user11990507 on Dec 8, 2009 7:13 AM -
How to identify one specific row in the table STPO?
Hi!
How can I identify one specific row in the table STOP? As an input for my ABAP function I have MatNr, Plant, Alternative, BomUsage and Bom Position (0010, 0020...). With these values I can ask the table MAST to get the STLNR. But how can I get all needed values to specify an entry in the table STPO then?
Thanks,
KonradHere is a actual working code that we used here.
*-- get the bom details
li_mast-mandt = sy-mandt.
li_mast-matnr = material.
li_mast-werks = '6000'.
li_mast-stlan = '1'.
call function 'GET_MAST'
exporting
all = 'X'
no_buffer = 'X'
set = 'X'
tables
wa = li_mast
exceptions
call_invalid = 1
end_of_table = 2
get_without_set = 3
key_incomplete = 4
key_invalid = 5
no_record_found = 6
others = 7.
if sy-subrc <> 0.
clear: kdf_material,
kdf_material_desc.
exit.
endif.
loop at li_mast.
*-- get the valid headers
move-corresponding li_mast to li_stko.
li_stko-stlty = 'M'.
call function 'GET_STKO'
exporting
all = 'X'
datub = l_valid_date
datuv = l_valid_date
del = ' '
no_buffer = 'X'
set = 'X'
valid = 'X'
tables
wa = li_stko
exceptions
call_invalid = 1
end_of_table = 2
get_without_set = 3
key_incomplete = 4
key_invalid = 5
no_record_found = 6
others = 7.
if sy-subrc <> 0.
continue.
endif.
loop at li_stko.
move-corresponding li_stko to li_stpo.
call function 'GET_STPO'
exporting
all = 'X'
alter = li_stko-stlal
datub = l_valid_date
datuv = l_valid_date
no_buffer = 'X'
set = 'X'
valid = 'X'
* VIEWNAME =
tables
add_wa = li_cszalt
wa = li_stpo
exceptions
call_invalid = 1
end_of_table = 2
get_without_set = 3
key_incomplete = 4
key_invalid = 5
no_record_found = 6
viewname_invalid = 7
others = 8.
if sy-subrc <> 0.
continue.
else.
exit.
endif.
endloop.
if not li_stpo[] is initial.
exit.
endif.
endloop. -
Save and refresh after entering data inoto table ( update)
hello guys,
im using abap webdynpro now. and im facing a problem with the saving and update " refresh function"
I have entry table and some other text input.
the thing im doing is to enter data in the filed, attachment, drop down selection. then the data will be saved into the table in the same page
and need to refresh the page automaticlly when doing this. so the used does not have to do it manully
please help me in this..code, source, or hints.
Thanks
Lilythanks Manas Dua
I could do that, but this is going to be problem with performance side.
I want a method or something to make it easier, faster too
please help me in code or something if that possible.
Regards
Lily -
Save and refresh after entering data inoto table.
hello guys,
im using abap webdynpro now. and im facing a problem with the saving and update " refresh function"
I have entry table and some other text input.
the thing im doing is to enter data in the filed, attachment, drop down selection. then the data will be saved into the table in the same page
and need to refresh the page automaticlly when doing this. so the used does not have to do it manully
please help me in this..code, source, or hints.
Thanks
Lilywell , the guys guid me to some ideas.
yes..after entering data into filed, textinput. the data will goes to the table after clicking " save" button. after that I want the table to be updated.
thanks -
To color a specific row in a Table UI element
Hello Experts,
We have a requirement to highlight (with distinguish color) a specific row of a table UI based on column data.
Suppose we have a table with 5 column and 10 row, now if the data on 5th column greater than some XYZ value then we need to highlight the specific row with a different color.
Can anyone please help me to achieve this requirement?
Thanks & Regards,
Sambaran ChakrabortyHi,
In your outline, I am missing quite a few prerequisites which I mentioned (not sure if you have implemented them already)
your sub node, does it have singleton=false, cardinality 1..1 and selection cardinality 1..1?
The attribute of type TableCellDesign in that sub node, does it have the calculated property to true?
If you've bound each table column's cellDesign property to this calculated attribute, you just put some code in the generated generated get<SubNode><CalcAttribute> method to set the color
For instance by just entering the line
return WDTableCellDesign.CRITICALVALUE_LIGHT
in that method will render each linked cell to that color
Not sure what else I can say to explain this, there's not much to code... -
Bypass D-Chain specific status of material master
Hi,
Is there a way ( Copy Routine/ user exit) to bypass D-Chain specific status of material master which prevents creation of Delivery doc w.r.t a PO in STO scenario?
I dont want change the config setting for status to allow delivery creation.
Thanks in Advance
SubhankarHi Kapil,
Threre are some material for which D-Chain status ( MVKE-VMSTA) in the materila master are set in such a way so that deliveries can not be created. We need to bypass this restriction for couple of delivery types. One of them is the delivery type used for intracompany STO.
I am looking for some way out like user exit so that I dont need to change existing config change for those statuses.
Regards,
Subhankar -
Query Related to Addition Of Customer Specific Tab in Material Master
Hi Experts,
we had a requirement from our client to add certain specific fields in Material Master. we added all those fields in a "User Tab" created by copying "Basic Data Tab" & it's attributes in SPRO. After this was done the transaction was running fine but when we want to migrate to another tab say "Basic Data Tab" we are not able to do so as we are still on the same User Tab.
Please help me on this <removed by moderator>.
<removed by moderator>
Thanks & Regards
Priyesh Shah
Edited by: Thomas Zloch on Jun 29, 2011 11:06 PM - urgency reduced, please do not offer ...Thanks for your reply.
I would like to know am using strategy 52 for this FG, so that i can have option to procure order specific components after sales order arrival, and components which are not specific to the order can be procured before sales order arrival. Where am confused is if am planning with FG1 i.e. am entering PIR for FG1 and am procuring order independent components before sales order arrival and suppose if the sales order arrives for FG2 for which components i have procured before sales order arrival is same but the remaining components which are order specific are different from that of FG1, then how the MRP shall behave. How the requirement for the FG2 shall be met. Kindly throw some light on this scenario.
Expecting a positive and prompt response.
Regards,
J K Tharwani -
Grant select privilege to specific columns on a table to user in Oracle 9i
Can anyone tell me how to grant select privilege to a user for specific columns in a table?
I have tried the following statement
GRANT SELECT (EMP_ID) ON EMP TO USER1
But it's not working and I am getting this error "Missing ON Keyword".
Please anyone tell me how to grant select privilege for specific columns.
Edited by: 899045 on Nov 24, 2011 7:03 AM899045 wrote:
Can anyone tell me how to grant select privilege to a user for specific columns in a table?
I have tried the following statement
GRANT SELECT (EMP_ID) ON EMP TO USER1
But it's not working and I am getting this error "Missing ON Keyword".
Please anyone tell me how to grant select privilege for specific columns.
Edited by: 899045 on Nov 24, 2011 7:03 AMFrom the 9.2 SQL Reference manual, found at tahiti.oracle.com (http://docs.oracle.com/cd/B10501_01/server.920/a96540/statements_912a.htm#2062456)
*"You can specify columns only when granting the INSERT, REFERENCES, or UPDATE privilege. "* -
Maximum No. of Partitions in a Table?
Hi,
What is the Maximum no.of partitions in a table?
Best Regards,
Naresh Kumar C.All resides in what is 1K ?
First option (more popular) : 1K=1024, so 1024K = 1024*1024
Second option (less popular) : 1K = 1000, 1024K = 1024*1000
http://en.wikipedia.org/wiki/Byte
Have you really need to 1024K-1 partitions (either one or other option, it's already huge for number of partitions) ? Good luck for maintenance tasks...
Nicolas.
Maybe you are looking for
-
Application Folder Not Showing In HD
I want to have my Applications folder showing in my dock, the problem is when I open up my HD, there is no Applications folder to drag to the dock. It shows in the sidebar and all my applications are accessible from there. Any help woould be greatly
-
How I can respond to iPhone from my Mac?
How I can respond to iPhone from my Mac? There is not the symbol of hotspot up on desktop, close to wifi... He doesn't should? Thank you.
-
Tiny hand-made extension for Mavericks, how-to/what-with?
Tiny hand-made extension for Mavericks, how-to/what-with? We need one small extension in Mavericks. The goal and prerequisites are described below. Preferable on script basis. The question how the goals can be achieved and by use of which Mavericks o
-
CUP: Delete user certain time after request has been created
Hi, Is it possible to define in CUP a delete account workflow that once the request has been created user deletion waits some time (i.e 1 month) before user is finally deleted? We would need a workflow without any approver. Delete User request creati
-
Hi all, I am new to flex. Literally days into this. I have followed an example from the flex 3 bible and created a Flex applciation calling an AMFPHP service. I got the hello world to appear and was pretty chuffed with that. (code used is below) I ha