FND_ATTACHED_DOCUMENTS is one of the largest tables in terms of number of rows. It contains reference of all attachments from all the iModules like iRecruitment, iSupplier, iSourcing etc. Here's the structure of the table
SQL> desc fnd_attached_documents
Name Null? Type
----------------------------------------- --------
ATTACHED_DOCUMENT_ID NOT NULL NUMBER
DOCUMENT_ID NOT NULL NUMBER
CREATION_DATE NOT NULL DATE
CREATED_BY NOT NULL NUMBER
LAST_UPDATE_DATE NOT NULL DATE
LAST_UPDATED_BY NOT NULL NUMBER
LAST_UPDATE_LOGIN NUMBER
SEQ_NUM NOT NULL NUMBER
ENTITY_NAME NOT NULL VARCHAR2(40)
PK1_VALUE VARCHAR2(100)
PK2_VALUE VARCHAR2(100)
PK3_VALUE VARCHAR2(100)
PK4_VALUE VARCHAR2(150)
PK5_VALUE VARCHAR2(150)
AUTOMATICALLY_ADDED_FLAG NOT NULL VARCHAR2(1)
PROGRAM_APPLICATION_ID NUMBER
PROGRAM_ID NUMBER
PROGRAM_UPDATE_DATE DATE
REQUEST_ID NUMBER
ATTRIBUTE_CATEGORY VARCHAR2(30)
ATTRIBUTE1 VARCHAR2(150)
ATTRIBUTE2 VARCHAR2(150)
ATTRIBUTE3 VARCHAR2(150)
ATTRIBUTE4 VARCHAR2(150)
ATTRIBUTE5 VARCHAR2(150)
ATTRIBUTE6 VARCHAR2(150)
ATTRIBUTE7 VARCHAR2(150)
ATTRIBUTE8 VARCHAR2(150)
ATTRIBUTE9 VARCHAR2(150)
ATTRIBUTE10 VARCHAR2(150)
ATTRIBUTE11 VARCHAR2(150)
ATTRIBUTE12 VARCHAR2(150)
ATTRIBUTE13 VARCHAR2(150)
ATTRIBUTE14 VARCHAR2(150)
ATTRIBUTE15 VARCHAR2(150)
COLUMN1 VARCHAR2(30)
APP_SOURCE_VERSION VARCHAR2(255)
CATEGORY_ID NUMBER
STATUS VARCHAR2(30)
In our largest environment, this table has 12752217 rows. We have had performance issues with patches which try to update this table. A datafix patch specifically developed by Oracle for our environment hangs while executing this statement:
UPDATE fnd_attached_documents fad
SET (created_by, last_updated_by) =
(SELECT nvl(paha.created_by,fad.created_by), nvl(paha.created_by,fad.last_updated_by)
FROM pon_auction_headers_all paha
WHERE fad.pk1_value = paha.auction_header_id
)
WHERE fad.entity_name = 'PON_AUCTION_ITEM_PRICES_ALL'
AND fad.created_by = 1
AND exists
(SELECT '1'
FROM pon_auction_item_prices_all pai,
pon_auction_headers_all paha1
WHERE fad.pk1_value = to_char(pai.auction_header_id)
AND fad.pk2_value = to_char(pai.line_number)
AND paha1.auction_header_id = pai.auction_header_id
AND pai.rowid BETWEEN l_start_rowid AND l_end_rowid);
We have waited for 24 hours before aborting the patch. Oracle is yet to give us a good reason why this query hangs.
Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps
Thursday, February 28, 2008
Subscribe to:
Post Comments (Atom)
3 comments:
Vikram
Your blog articles are excellent. keep it up.
Regards
Suresh
http://applicationsdba.blogspot.com
Hi Suresh,
Thanks for your encouragement.
- Vikram
Hi Vikram,
Can you tell me where the attached documents are store.
fnd_attached_documents has a reference of the documents i`ve attached, but where is stored in case i want to add an "Attachment" field to a oaf website(to consult the file).
your blog is A++
thanks,
HJ
Post a Comment