Well this does speed up search, but we just found out that it seems to only pass up the uncontrolled values for us now, not the coded value ones.
The coalesce part of the select is only grabbing the first value for our system.
Sample outputs pre-change and post-change with the branch for...
SELECT * FROM metabib.record_attr_flat WHERE id = 1348457 ORDER BY attr;
1348457|audience|j 1348457|bib_level|m 1348457|cat_form|a 1348457|conf|0 1348457|ctry|nyu 1348457|date1|1987 1348457|date2|9999 1348457|fest|0 1348457|icon_format|book 1348457|ills|a 1348457|indx|0 1348457|item_lang|eng 1348457|item_type|a 1348457|language|eng 1348457|lit_form|0 1348457|lit_form|0 1348457|mr_hold_format|book 1348457|oclc|ocm15017231 1348457|pub_status|m 1348457|search_format|book
vs.
1348457|cat_form|a 1348457|conf|0 1348457|ctry|nyu 1348457|date1|1987 1348457|date2|9999 1348457|fest|0 1348457|ills|a 1348457|indx|0 1348457|language|eng 1348457|oclc|ocm15017231 1348457|pub_status|m
I'm not sure yet, but this seems to affect things like acquisitions loading and matching. Further testing pending.
Well this does speed up search, but we just found out that it seems to only pass up the uncontrolled values for us now, not the coded value ones.
The coalesce part of the select is only grabbing the first value for our system.
Sample outputs pre-change and post-change with the branch for...
SELECT * FROM metabib. record_ attr_flat WHERE id = 1348457 ORDER BY attr;
1348457|audience|j icon_format| book item_lang| eng language| eng mr_hold_ format| book oclc|ocm1501723 1 pub_status| m search_ format| book
1348457|bib_level|m
1348457|cat_form|a
1348457|conf|0
1348457|ctry|nyu
1348457|date1|1987
1348457|date2|9999
1348457|fest|0
1348457|
1348457|ills|a
1348457|indx|0
1348457|
1348457|item_type|a
1348457|
1348457|lit_form|0
1348457|lit_form|0
1348457|
1348457|
1348457|
1348457|
vs.
1348457|cat_form|a language| eng oclc|ocm1501723 1 pub_status| m
1348457|conf|0
1348457|ctry|nyu
1348457|date1|1987
1348457|date2|9999
1348457|fest|0
1348457|ills|a
1348457|indx|0
1348457|
1348457|
1348457|
I'm not sure yet, but this seems to affect things like acquisitions loading and matching. Further testing pending.