Christopher Browne cbbrowne
Fri Jul 30 14:20:26 PDT 2004
Darcy Buskermolen <darcy at wavefire.com> writes:
> On July 28, 2004 04:19 pm, Thomas F.O'Connell wrote:
>> I'm not going to be able to send the output of the script without
>> fudging the table names, and that might be more trouble than it's
>> worth.
>>
>> Anyway, the summary should give you some idea of what I'm dealing with:
>>
>> ~7,000 set add table statements for tables with primary keys
>> ~9,000 table add key/set add table statement pairs for tables without
>> primary keys
>>
>> So I have a 25,000 line slonik script (which includes a relatively
>> insignificant number of sequences, too).
>>
>> -tfo
> Ok I'm testing a solution now and so far so good, 6 hours into testing it's 
> mannaged to add the 7,500 set add table statements for tables with primary 
> keys and its 5300 of the way through the 9,500 table add key/set add table 
> statement pairs for  tables without primary keys with out a catch so far. 

This looks for a case for some combination of:

 a) Using the stored procedure setAddTable(set_id, tab_id,
    fully_qualified_table_name, index_name, comment) directly, since that's 
    really all that slonik calls...

 b) Creating multiple sets, perhaps with intent of eventually merging
    them, so that you can start up replication incrementally.

    (Part of me is saying, incredulously, 16,000 tables?!?  SAP
    implemented their R/3 ERP system that supports enormous amounts of
    table-driven functionality with a mere two or three thousand
    tables, and if you look carefully, the schemas are pretty poorly
    normalized, so that that figure is pretty bloated...  And it took
    20 years for them to get to that many tables...)

 c) You can doubtless split the sets of requests into groups, whether
    there are multiple sets or not, and add them in parallel.  I'm not
    sure if there is any set-specific object that would force the
    setAddTable() calls to at some point run serially within a given
    set; if you have multiple sets, that would relieve that.

This sure is big enough to merit looking at options like running
setAddTable() directly...
-- 
"cbbrowne","@","ca.afilias.info"
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)


More information about the Slony1-general mailing list