<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.standart-n.ru/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wiki.standart-n.ru/wiki/index.php?action=history&amp;feed=atom&amp;title=%D0%A1%D0%B6%D0%B0%D1%82%D0%B8%D0%B5_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%BE%D0%B2</id>
		<title>Сжатие товаров - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.standart-n.ru/wiki/index.php?action=history&amp;feed=atom&amp;title=%D0%A1%D0%B6%D0%B0%D1%82%D0%B8%D0%B5_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%BE%D0%B2"/>
		<link rel="alternate" type="text/html" href="http://wiki.standart-n.ru/index.php?title=%D0%A1%D0%B6%D0%B0%D1%82%D0%B8%D0%B5_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%BE%D0%B2&amp;action=history"/>
		<updated>2026-04-03T22:01:55Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>http://wiki.standart-n.ru/index.php?title=%D0%A1%D0%B6%D0%B0%D1%82%D0%B8%D0%B5_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%BE%D0%B2&amp;diff=4301&amp;oldid=prev</id>
		<title>Aleksnick в 09:36, 14 июля 2016</title>
		<link rel="alternate" type="text/html" href="http://wiki.standart-n.ru/index.php?title=%D0%A1%D0%B6%D0%B0%D1%82%D0%B8%D0%B5_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%BE%D0%B2&amp;diff=4301&amp;oldid=prev"/>
				<updated>2016-07-14T09:36:58Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 09:36, 14 июля 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Выполнить скрипт==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Выполнить скрипт==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nowiki&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--&lt;/del&gt;1) Накатываем индексы, чтобы выполнялось быстрее&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/* &lt;/ins&gt;1) Накатываем индексы, чтобы выполнялось быстрее &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE INDEX DOC_DETAIL_ACTIVE_CANCELED_IDX3 ON DOC_DETAIL_ACTIVE_CANCELED (WARE_ID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE INDEX DOC_DETAIL_ACTIVE_CANCELED_IDX3 ON DOC_DETAIL_ACTIVE_CANCELED (WARE_ID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE INDEX DOC_DETAIL_ACTIVE_NAMEID_IDX5 ON DOC_DETAIL_ACTIVE_NAMEID (WARE_ID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE INDEX DOC_DETAIL_ACTIVE_NAMEID_IDX5 ON DOC_DETAIL_ACTIVE_NAMEID (WARE_ID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE INDEX DOC_DETAIL_ACTIVE_IDX12 ON DOC_DETAIL_ACTIVE (WARE_ID);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE INDEX DOC_DETAIL_ACTIVE_IDX12 ON DOC_DETAIL_ACTIVE (WARE_ID);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--&lt;/del&gt;2) Делаем WARES_IDX1 не уникальным&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/* &lt;/ins&gt;2) Делаем WARES_IDX1 не уникальным &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;DROP INDEX WARES_IDX1;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;DROP INDEX WARES_IDX1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE INDEX WARES_IDX1 ON WARES (NAME_ID,IZG_ID,COUNTRY_ID,ORIG_CODE,ORIG_NAME_ID,ORIG_IZG_ID,ORIG_COUNTRY_ID,BARCODE);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE INDEX WARES_IDX1 ON WARES (NAME_ID,IZG_ID,COUNTRY_ID,ORIG_CODE,ORIG_NAME_ID,ORIG_IZG_ID,ORIG_COUNTRY_ID,BARCODE);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--&lt;/del&gt;3) Правим UPDPR_REPARWARES&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/* &lt;/ins&gt;3) Правим UPDPR_REPARWARES &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SET TERM ^ ;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;SET TERM ^ ;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;update DOC_DETAIL_ACTIVE_CANCELED set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;update DOC_DETAIL_ACTIVE_CANCELED set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;update DOC_DETAIL_ACTIVE_NAMEID set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;update DOC_DETAIL_ACTIVE_NAMEID set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--&lt;/del&gt;update DOC_DETAIL_ACTIVE_TREB set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/* &lt;/ins&gt;update DOC_DETAIL_ACTIVE_TREB set ware_id=:id where ware_id=:t_id; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;update DOC_DETAIL_DELETED set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;update DOC_DETAIL_DELETED set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;update OUT$ZAKAZ set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;update OUT$ZAKAZ set ware_id=:id where ware_id=:t_id;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 53:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--&amp;#160; &lt;/del&gt;suspend;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/* &lt;/ins&gt;suspend; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end^&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;end^&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 78:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 78:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;GRANT EXECUTE ON PROCEDURE UPDPR_REPARWARES TO SYSDBA;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;GRANT EXECUTE ON PROCEDURE UPDPR_REPARWARES TO SYSDBA;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;--&lt;/del&gt;4) Сжимаем WARES и создаем WARES_IDXU&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;/* &lt;/ins&gt;4) Сжимаем WARES и создаем WARES_IDXU &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;EXECUTE PROCEDURE UPDPR_REPARWARES;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;EXECUTE PROCEDURE UPDPR_REPARWARES;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE UNIQUE INDEX WARES_IDXU ON WARES (NAME_ID,IZG_ID,COUNTRY_ID,BARCODE);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;CREATE UNIQUE INDEX WARES_IDXU ON WARES (NAME_ID,IZG_ID,COUNTRY_ID,BARCODE);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;nowiki&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Aleksnick</name></author>	</entry>

	<entry>
		<id>http://wiki.standart-n.ru/index.php?title=%D0%A1%D0%B6%D0%B0%D1%82%D0%B8%D0%B5_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%BE%D0%B2&amp;diff=4282&amp;oldid=prev</id>
		<title>Agk: Новая страница: «==Выполнить скрипт==  &lt;nowiki&gt; --1) Накатываем индексы, чтобы выполнялось быстрее CREATE INDEX DOC_DETAIL_A…»</title>
		<link rel="alternate" type="text/html" href="http://wiki.standart-n.ru/index.php?title=%D0%A1%D0%B6%D0%B0%D1%82%D0%B8%D0%B5_%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D0%BE%D0%B2&amp;diff=4282&amp;oldid=prev"/>
				<updated>2016-07-13T13:00:12Z</updated>
		
		<summary type="html">&lt;p&gt;Новая страница: «==Выполнить скрипт==  &amp;lt;nowiki&amp;gt; --1) Накатываем индексы, чтобы выполнялось быстрее CREATE INDEX DOC_DETAIL_A…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Выполнить скрипт==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
--1) Накатываем индексы, чтобы выполнялось быстрее&lt;br /&gt;
CREATE INDEX DOC_DETAIL_ACTIVE_CANCELED_IDX3 ON DOC_DETAIL_ACTIVE_CANCELED (WARE_ID);&lt;br /&gt;
CREATE INDEX DOC_DETAIL_ACTIVE_NAMEID_IDX5 ON DOC_DETAIL_ACTIVE_NAMEID (WARE_ID);&lt;br /&gt;
CREATE INDEX DOC_DETAIL_DELETED_IDX8 ON DOC_DETAIL_DELETED (WARE_ID);&lt;br /&gt;
CREATE INDEX DOC_DETAIL_ACTIVE_IDX12 ON DOC_DETAIL_ACTIVE (WARE_ID);&lt;br /&gt;
&lt;br /&gt;
--2) Делаем WARES_IDX1 не уникальным&lt;br /&gt;
DROP INDEX WARES_IDX1;&lt;br /&gt;
CREATE INDEX WARES_IDX1 ON WARES (NAME_ID,IZG_ID,COUNTRY_ID,ORIG_CODE,ORIG_NAME_ID,ORIG_IZG_ID,ORIG_COUNTRY_ID,BARCODE);&lt;br /&gt;
&lt;br /&gt;
--3) Правим UPDPR_REPARWARES&lt;br /&gt;
&lt;br /&gt;
SET TERM ^ ;&lt;br /&gt;
&lt;br /&gt;
create or alter procedure UPDPR_REPARWARES&lt;br /&gt;
returns (&lt;br /&gt;
    ID DM_TEXT)&lt;br /&gt;
as&lt;br /&gt;
declare variable NAME_ID DM_TEXT;&lt;br /&gt;
declare variable IZG_ID DM_TEXT;&lt;br /&gt;
declare variable COUNTRY_ID DM_TEXT;&lt;br /&gt;
declare variable ORIG_CODE DM_TEXT;&lt;br /&gt;
declare variable ORIG_NAME_ID DM_TEXT;&lt;br /&gt;
declare variable ORIG_IZG_ID DM_TEXT;&lt;br /&gt;
declare variable ORIG_COUNTRY_ID DM_TEXT;&lt;br /&gt;
declare variable T_ID DM_TEXT;&lt;br /&gt;
declare variable BARCODE DM_TEXT;&lt;br /&gt;
begin&lt;br /&gt;
delete from DOC_DETAIL_ACTIVE_LOG;&lt;br /&gt;
for select min(id), NAME_ID, IZG_ID, COUNTRY_ID, BARCODE from wares&lt;br /&gt;
group by NAME_ID, IZG_ID, COUNTRY_ID, BARCODE&lt;br /&gt;
having count(1)&amp;gt;1&lt;br /&gt;
into id, NAME_ID,IZG_ID,COUNTRY_ID,BARCODE do&lt;br /&gt;
begin&lt;br /&gt;
for&lt;br /&gt;
select id from wares where NAME_ID=:NAME_ID and IZG_ID=:IZG_ID and COUNTRY_ID=:COUNTRY_ID and BARCODE=:BARCODE and id&amp;lt;&amp;gt;:id into :t_id do&lt;br /&gt;
begin&lt;br /&gt;
update DOC_DETAIL_ACTIVE set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update DOC_DETAIL_ACTIVE_CANCELED set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update DOC_DETAIL_ACTIVE_NAMEID set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
--update DOC_DETAIL_ACTIVE_TREB set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update DOC_DETAIL_DELETED set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update OUT$ZAKAZ set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update PARTS set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update PARTS_LOG set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update WAREBASE set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update WAREBASEFOLDERS set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
update WAREBASENAMEID set ware_id=:id where ware_id=:t_id;&lt;br /&gt;
delete from wares where id=:t_id;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
--  suspend;&lt;br /&gt;
end^&lt;br /&gt;
&lt;br /&gt;
SET TERM ; ^&lt;br /&gt;
&lt;br /&gt;
/* Following GRANT statetements are generated automatically */&lt;br /&gt;
&lt;br /&gt;
GRANT SELECT,DELETE ON DOC_DETAIL_ACTIVE_LOG TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,DELETE ON WARES TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON DOC_DETAIL_ACTIVE TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON DOC_DETAIL_ACTIVE_CANCELED TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON DOC_DETAIL_ACTIVE_NAMEID TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON DOC_DETAIL_ACTIVE_TREB TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON DOC_DETAIL_DELETED TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON OUT$ZAKAZ TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON PARTS TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON PARTS_LOG TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON WAREBASE TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON WAREBASEFOLDERS TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
GRANT SELECT,UPDATE ON WAREBASENAMEID TO PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
&lt;br /&gt;
/* Existing privileges on this procedure */&lt;br /&gt;
&lt;br /&gt;
GRANT EXECUTE ON PROCEDURE UPDPR_REPARWARES TO SYSDBA;&lt;br /&gt;
&lt;br /&gt;
--4) Сжимаем WARES и создаем WARES_IDXU&lt;br /&gt;
EXECUTE PROCEDURE UPDPR_REPARWARES;&lt;br /&gt;
CREATE UNIQUE INDEX WARES_IDXU ON WARES (NAME_ID,IZG_ID,COUNTRY_ID,BARCODE);&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Agk</name></author>	</entry>

	</feed>