1 |
2230
|
jones
|
/* This is a series of commands that could be used under the right
|
2 |
|
|
env to modify the xml_nodes table to make the nodedata column
|
3 |
|
|
smaller so that it can be indexed. How this would work without
|
4 |
|
|
losing data for rows that are > 3000 chars is not yet fully worked out,
|
5 |
|
|
so do NOT apply this indiscriminately.
|
6 |
|
|
*/
|
7 |
|
|
ALTER TABLE xml_documents MODIFY CONSTRAINT xml_documents_root_fk DISABLE;
|
8 |
|
|
ALTER TABLE xml_revisions MODIFY CONSTRAINT xml_revisions_root_fk DISABLE;
|
9 |
|
|
ALTER TABLE xml_index MODIFY CONSTRAINT xml_index_nodeid_fk DISABLE;
|
10 |
|
|
ALTER TABLE xml_nodes MODIFY CONSTRAINT xml_nodes_parent_fk DISABLE;
|
11 |
|
|
ALTER TABLE xml_nodes MODIFY CONSTRAINT xml_nodes_root_fk DISABLE;
|
12 |
|
|
CREATE TABLE xnodesback AS SELECT * FROM xml_nodes;
|
13 |
|
|
DELETE FROM xml_nodes;
|
14 |
|
|
ALTER TABLE xml_nodes MODIFY (nodedata VARCHAR2(3000));
|
15 |
|
|
INSERT INTO xml_nodes (NODEID, NODEINDEX, NODETYPE, NODENAME, NODEPREFIX,
|
16 |
|
|
NODEDATA, PARENTNODEID, ROOTNODEID, DOCID,
|
17 |
|
|
DATE_CREATED, DATE_UPDATED)
|
18 |
|
|
SELECT * FROM xnodesback;
|
19 |
|
|
ALTER TABLE xml_documents MODIFY CONSTRAINT xml_documents_root_fk ENABLE NOVALIDATE;
|
20 |
|
|
ALTER TABLE xml_revisions MODIFY CONSTRAINT xml_revisions_root_fk ENABLE NOVALIDATE;
|
21 |
|
|
ALTER TABLE xml_index MODIFY CONSTRAINT xml_index_nodeid_fk ENABLE NOVALIDATE;
|
22 |
|
|
ALTER TABLE xml_nodes MODIFY CONSTRAINT xml_nodes_parent_fk ENABLE NOVALIDATE;
|
23 |
|
|
ALTER TABLE xml_nodes MODIFY CONSTRAINT xml_nodes_root_fk ENABLE NOVALIDATE;
|