4.4.2 to 4.8.0 = ~2mins for the admin interface to load

[quote]
Yes!!! Chris, thank you! It's down to 3.1GB now.



OK, just a couple of things to polish off, but then I don't know how serious these are:


    
    Some tables have incorrect names for primary keys.
    This won't cause any problems, but upgrade guides may be harder to follow
    as they expect the names to be a certain way.
    To fix these tables, run the following commands
    They can take a while depending on the size of the table.
    
    BEGIN;
    ALTER TABLE ONLY sq_ast_attr_val DROP CONSTRAINT sq_ast_attr_val_pkey;
    ALTER TABLE sq_ast_attr_val ADD CONSTRAINT ast_attr_val_pk PRIMARY KEY (assetid,attrid,contextid);
    ALTER TABLE ONLY sq_rb_ast_attr_val DROP CONSTRAINT sq_rb_ast_attr_val_pkey;
    ALTER TABLE sq_rb_ast_attr_val ADD CONSTRAINT rb_ast_attr_val_pk PRIMARY KEY (sq_eff_from,assetid,attrid,contextid);
    ALTER TABLE ONLY sq_ast_attr_uniq_val DROP CONSTRAINT sq_ast_attr_uniq_val_pkey;
    ALTER TABLE sq_ast_attr_uniq_val ADD CONSTRAINT ast_attr_uniq_val_pk PRIMARY KEY (owning_attrid,contextid,custom_val);
    ALTER TABLE ONLY sq_rb_ast_attr_uniq_val DROP CONSTRAINT sq_rb_ast_attr_uniq_val_pkey;
    ALTER TABLE sq_rb_ast_attr_uniq_val ADD CONSTRAINT rb_ast_attr_uniq_val_pk PRIMARY KEY (sq_eff_from,owning_attrid,contextid,custom_val);
    ALTER TABLE ONLY sq_ast_mdata_val DROP CONSTRAINT sq_ast_mdata_val_pkey;
    ALTER TABLE sq_ast_mdata_val ADD CONSTRAINT ast_mdata_val_pk PRIMARY KEY (assetid,fieldid,contextid);
    ALTER TABLE ONLY sq_rb_ast_mdata_val DROP CONSTRAINT sq_rb_ast_mdata_val_pkey;
    ALTER TABLE sq_rb_ast_mdata_val ADD CONSTRAINT rb_ast_mdata_val_pk PRIMARY KEY (sq_eff_from,assetid,fieldid,contextid);
    ALTER TABLE ONLY sq_ast_mdata_dflt_val DROP CONSTRAINT sq_ast_mdata_dflt_val_pkey;
    ALTER TABLE sq_ast_mdata_dflt_val ADD CONSTRAINT ast_mdata_dflt_val_pk PRIMARY KEY (assetid,contextid);
    ALTER TABLE ONLY sq_rb_ast_mdata_dflt_val DROP CONSTRAINT sq_rb_ast_mdata_dflt_val_pkey;
    ALTER TABLE sq_rb_ast_mdata_dflt_val ADD CONSTRAINT rb_ast_mdata_dflt_val_pk PRIMARY KEY (sq_eff_from,assetid,contextid);
    ALTER TABLE ONLY sq_sch_idx DROP CONSTRAINT sq_sch_idx_pkey;
    ALTER TABLE sq_sch_idx ADD CONSTRAINT sch_idx_pk PRIMARY KEY (value,assetid,component,contextid);
    COMMIT;
    
    ------------------------------------
    
    ------------------------------------
    Extra indexes have been found on the following tables.
    If these changes have been made deliberately, ignore this warning.
    This can lead to performance loss.
    To remove these, run the following command(s):
    
    These were found on table sq_ast_attr_val:
    DROP INDEX sq_ast_attr_val_contextid;
    
    These were found on table sq_internal_msg:
    DROP INDEX sq_internal_msg_userto;
    ------------------------------------


Is this something I acutally missed during previous upgrades or should I ignore this?

Sorry about the amount of text, but i though it would be best to just output everything.

Thank you all!
[/quote]

Those index changes are just a naming thing. Matrix is looking for 'ast_attr_val_pk' but found 'ast_attr_val_pkey' instead. It's not going to affect anything right now but may later if an upgrade looks for 'ast_attr_val_pk' to change the primary key of the table, it won't be able to find it.

Dropping those extra indexes at the end should speed up particular actions on those tables (insert/update/deletes).

[quote]
Not so much worried about the Broke sort order test, as the missing links are of type of notice or type_3 ("design::system::frontend", "css_cache", "thumbnail" etc…). I understand it make sense that these errors come up then.

[/quote]



Those links have a sort order as well, the broken sort order test just reports when there are breaks in the sort order (eg. 1,2,3,6,7,8 missing 4,5). These should not affect the system much but you may get occasional asset map error about not finding the asset.


[quote]

I am slightly confused by the attribute errors. For example, 3520 is just a standard page, 3521 is the bodycopy. What could be causing these.

[/quote]



You misread the error, it was Attribute #3520 and Attribute #3521 missing from the table.


[quote]

"Link #7534 has 731 kids listed, but actually 548 kids were found" is a little weird, as there are only 4 "kids".

[/quote]



From memory, I think this test will count children, grandchildren etc. (basically anything underneath that link).



Hope that helps

[quote]
Those index changes are just a naming thing. Matrix is looking for 'ast_attr_val_pk' but found 'ast_attr_val_pkey' instead. It's not going to affect anything right now but may later if an upgrade looks for 'ast_attr_val_pk' to change the primary key of the table, it won't be able to find it.



Dropping those extra indexes at the end should speed up particular actions on those tables (insert/update/deletes).

[/quote]



So should I run the suggested alterations or let it be?

[quote]
Those links have a sort order as well, the broken sort order test just reports when there are breaks in the sort order (eg. 1,2,3,6,7,8 missing 4,5). These should not affect the system much but you may get occasional asset map error about not finding the asset.

[/quote]



OK, the reason i though it was counting the notice links, is because the numbers in the above output correspond with the number of linked children including notice links etc and the number of visible linked assets. If it's not anything to be worries about, that's fine then


[quote]

You misread the error, it was Attribute #3520 and Attribute #3521 missing from the table.

[/quote]



OK,I probably have misread the error, but what does it mean? :slight_smile:


[quote]

From memory, I think this test will count children, grandchildren etc. (basically anything underneath that link).

[/quote]



Well, it can't be, because the number of children including grandchildren etc is 16, which is no where near the reported 534 found.


[quote]

Hope that helps

[/quote]



Everything helps! :slight_smile:

[quote]
Well, it can't be, because the number of children including grandchildren etc is 16, which is no where near the reported 534 found.

[/quote]



Are you sure you are looking at link 7534 and not asset 7534?

[quote]
Are you sure you are looking at link 7534 and not asset 7534?

[/quote]



I was looking at the asset! :confused:

[quote]
I was looking at the asset! :confused:

[/quote]



In that case, you'll want to: select minorid from sq_ast_lnk where linkid = 7534

That will be the asset ID you want to check out.

[quote]
In that case, you'll want to: select minorid from sq_ast_lnk where linkid = 7534

That will be the asset ID you want to check out.

[/quote]



Thank you Greg, this makes sense now. It's a user folder with 548 of them.

Greg, do you know if I should be running the suggested table alterations from system_integrity_check_indexes.php?

[quote]
OK,I probably have misread the error, but what does it mean? :slight_smile:

[/quote]



Something most likely hasn't cleaned up properly. The entries do not match between sq_ast_attr and sq_ast_attr_val tables (that test checks for valid attributes and assetids on the sq_ast_attr_val table).

[quote]
Greg, do you know if I should be running the suggested table alterations from system_integrity_check_indexes.php?

[/quote]



Yes, I'd run them. As Chris said, the primary key ones aren't going to actually change anything noticeable, but removing the unused indexes may speed things up.