György Kohut avatar György Kohut committed 4f311c4

add index

Comments (0)

Files changed (2)

schema/hbbackend.erm

 			</connections>
 			<display>false</display>
 			<creation_date>2011-06-10 22:42:09</creation_date>
-			<updated_date>2012-08-08 19:05:31</updated_date>
+			<updated_date>2012-08-08 20:04:51</updated_date>
 			<model_property>
 				<name>Project Name</name>
 				<value></value>
 		</table>
 		<table>
 			<id>7</id>
-			<height>128</height>
-			<width>222</width>
+			<height>170</height>
+			<width>334</width>
 				<font_name>Lucida Grande</font_name>
 				<font_size>9</font_size>
-			<x>1102</x>
-			<y>52</y>
+			<x>729</x>
+			<y>32</y>
 			<color>
 				<r>128</r>
 				<g>128</g>
 			<connections>
 				<relation>
 					<id>2</id>
-					<source>8</source>
+					<source>6</source>
 					<target>7</target>
 					<child_cardinality>1..n</child_cardinality>
 					<parent_cardinality>1</parent_cardinality>
 					<referenced_complex_unique_key>null</referenced_complex_unique_key>
 				</relation>
 			</connections>
-			<physical_name>virustotal_results</physical_name>
-			<logical_name>virustotal_results</logical_name>
+			<physical_name>virustotal_reports</physical_name>
+			<logical_name>virustotal_reports</logical_name>
 			<description></description>
 			<constraint></constraint>
 			<primary_key_name></primary_key_name>
 			<option></option>
 			<columns>
 				<normal_column>
+					<word_id>13</word_id>
 					<id>47</id>
-					<referenced_column>52</referenced_column>
-					<relation>2</relation>
 					<description></description>
 					<unique_key_name></unique_key_name>
-					<logical_name>report_id</logical_name>
-					<physical_name>report_id</physical_name>
-					<type>bigint</type>
+					<logical_name></logical_name>
+					<physical_name></physical_name>
+					<type>bigserial</type>
 					<constraint></constraint>
 					<default_value></default_value>
 					<auto_increment>false</auto_increment>
-					<foreign_key>true</foreign_key>
+					<foreign_key>false</foreign_key>
 					<not_null>true</not_null>
-					<primary_key>false</primary_key>
-					<unique_key>false</unique_key>
+					<primary_key>true</primary_key>
+					<unique_key>true</unique_key>
 					<character_set></character_set>
 					<collation></collation>
 					<sequence>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>21</word_id>
 					<id>48</id>
+					<referenced_column>38</referenced_column>
+					<relation>2</relation>
 					<description></description>
 					<unique_key_name></unique_key_name>
-					<logical_name></logical_name>
-					<physical_name></physical_name>
-					<type>varchar</type>
+					<logical_name>binary_id</logical_name>
+					<physical_name>binary_id</physical_name>
+					<type>bigint</type>
 					<constraint></constraint>
 					<default_value></default_value>
 					<auto_increment>false</auto_increment>
-					<foreign_key>false</foreign_key>
-					<not_null>false</not_null>
+					<foreign_key>true</foreign_key>
+					<not_null>true</not_null>
 					<primary_key>false</primary_key>
 					<unique_key>false</unique_key>
 					<character_set></character_set>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>6</word_id>
+					<word_id>26</word_id>
 					<id>49</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 					<logical_name></logical_name>
 					<physical_name></physical_name>
-					<type>varchar</type>
+					<type>integer</type>
 					<constraint></constraint>
 					<default_value></default_value>
 					<auto_increment>false</auto_increment>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>8</word_id>
+					<word_id>27</word_id>
 					<id>50</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 					<logical_name></logical_name>
 					<physical_name></physical_name>
-					<type>varchar</type>
+					<type>bigint</type>
 					<constraint></constraint>
 					<default_value></default_value>
 					<auto_increment>false</auto_increment>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>7</word_id>
+					<word_id>29</word_id>
 					<id>51</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 						<decimal_size>0</decimal_size>
 					</sequence>
 				</normal_column>
-			</columns>
-			<indexes>
-			</indexes>
-			<complex_unique_key_list>
-			</complex_unique_key_list>
-			<table_properties>
-				<without_oids>true</without_oids>
-				<schema></schema>
-			</table_properties>
-		</table>
-		<table>
-			<id>8</id>
-			<height>170</height>
-			<width>334</width>
-				<font_name>Lucida Grande</font_name>
-				<font_size>9</font_size>
-			<x>729</x>
-			<y>32</y>
-			<color>
-				<r>128</r>
-				<g>128</g>
-				<b>192</b>
-			</color>
-			<connections>
-				<relation>
-					<id>3</id>
-					<source>6</source>
-					<target>8</target>
-					<child_cardinality>1..n</child_cardinality>
-					<parent_cardinality>1</parent_cardinality>
-					<reference_for_pk>true</reference_for_pk>
-					<name></name>
-					<on_delete_action>RESTRICT</on_delete_action>
-					<on_update_action>RESTRICT</on_update_action>
-					<source_xp>-1</source_xp>
-					<source_yp>-1</source_yp>
-					<target_xp>-1</target_xp>
-					<target_yp>-1</target_yp>
-					<referenced_column>null</referenced_column>
-					<referenced_complex_unique_key>null</referenced_complex_unique_key>
-				</relation>
-			</connections>
-			<physical_name>virustotal_reports</physical_name>
-			<logical_name>virustotal_reports</logical_name>
-			<description></description>
-			<constraint></constraint>
-			<primary_key_name></primary_key_name>
-			<option></option>
-			<columns>
 				<normal_column>
-					<word_id>13</word_id>
+					<word_id>28</word_id>
 					<id>52</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 					<logical_name></logical_name>
 					<physical_name></physical_name>
-					<type>bigserial</type>
+					<type>timestamp with time zone</type>
 					<constraint></constraint>
 					<default_value></default_value>
 					<auto_increment>false</auto_increment>
 					<foreign_key>false</foreign_key>
-					<not_null>true</not_null>
-					<primary_key>true</primary_key>
-					<unique_key>true</unique_key>
+					<not_null>false</not_null>
+					<primary_key>false</primary_key>
+					<unique_key>false</unique_key>
 					<character_set></character_set>
 					<collation></collation>
 					<sequence>
 					</sequence>
 				</normal_column>
 				<normal_column>
+					<word_id>25</word_id>
 					<id>53</id>
-					<referenced_column>38</referenced_column>
-					<relation>3</relation>
 					<description></description>
 					<unique_key_name></unique_key_name>
-					<logical_name>binary_id</logical_name>
-					<physical_name>binary_id</physical_name>
-					<type>bigint</type>
+					<logical_name></logical_name>
+					<physical_name></physical_name>
+					<type>varchar</type>
 					<constraint></constraint>
 					<default_value></default_value>
 					<auto_increment>false</auto_increment>
-					<foreign_key>true</foreign_key>
-					<not_null>true</not_null>
+					<foreign_key>false</foreign_key>
+					<not_null>false</not_null>
 					<primary_key>false</primary_key>
 					<unique_key>false</unique_key>
 					<character_set></character_set>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>26</word_id>
+					<word_id>50</word_id>
 					<id>54</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 					<logical_name></logical_name>
 					<physical_name></physical_name>
-					<type>integer</type>
+					<type>timestamp with time zone</type>
 					<constraint></constraint>
-					<default_value></default_value>
+					<default_value>transaction_timestamp()</default_value>
 					<auto_increment>false</auto_increment>
 					<foreign_key>false</foreign_key>
 					<not_null>false</not_null>
 						<decimal_size>0</decimal_size>
 					</sequence>
 				</normal_column>
+			</columns>
+			<indexes>
+				<inidex>
+					<full_text>false</full_text>
+					<non_unique>true</non_unique>
+					<name>virustotal_reports_binary_id_idx</name>
+					<type></type>
+					<description></description>
+					<columns>
+						<column>
+							<id>48</id>
+							<desc>true</desc>
+						</column>
+					</columns>
+				</inidex>
+			</indexes>
+			<complex_unique_key_list>
+			</complex_unique_key_list>
+			<table_properties>
+				<without_oids>true</without_oids>
+				<schema></schema>
+			</table_properties>
+		</table>
+		<table>
+			<id>8</id>
+			<height>128</height>
+			<width>222</width>
+				<font_name>Lucida Grande</font_name>
+				<font_size>9</font_size>
+			<x>1102</x>
+			<y>52</y>
+			<color>
+				<r>128</r>
+				<g>128</g>
+				<b>192</b>
+			</color>
+			<connections>
+				<relation>
+					<id>3</id>
+					<source>7</source>
+					<target>8</target>
+					<child_cardinality>1..n</child_cardinality>
+					<parent_cardinality>1</parent_cardinality>
+					<reference_for_pk>true</reference_for_pk>
+					<name></name>
+					<on_delete_action>RESTRICT</on_delete_action>
+					<on_update_action>RESTRICT</on_update_action>
+					<source_xp>-1</source_xp>
+					<source_yp>-1</source_yp>
+					<target_xp>-1</target_xp>
+					<target_yp>-1</target_yp>
+					<referenced_column>null</referenced_column>
+					<referenced_complex_unique_key>null</referenced_complex_unique_key>
+				</relation>
+			</connections>
+			<physical_name>virustotal_results</physical_name>
+			<logical_name>virustotal_results</logical_name>
+			<description></description>
+			<constraint></constraint>
+			<primary_key_name></primary_key_name>
+			<option></option>
+			<columns>
 				<normal_column>
-					<word_id>27</word_id>
 					<id>55</id>
+					<referenced_column>47</referenced_column>
+					<relation>3</relation>
 					<description></description>
 					<unique_key_name></unique_key_name>
-					<logical_name></logical_name>
-					<physical_name></physical_name>
+					<logical_name>report_id</logical_name>
+					<physical_name>report_id</physical_name>
 					<type>bigint</type>
 					<constraint></constraint>
 					<default_value></default_value>
 					<auto_increment>false</auto_increment>
-					<foreign_key>false</foreign_key>
-					<not_null>false</not_null>
+					<foreign_key>true</foreign_key>
+					<not_null>true</not_null>
 					<primary_key>false</primary_key>
 					<unique_key>false</unique_key>
 					<character_set></character_set>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>29</word_id>
+					<word_id>21</word_id>
 					<id>56</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>28</word_id>
+					<word_id>6</word_id>
 					<id>57</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 					<logical_name></logical_name>
 					<physical_name></physical_name>
-					<type>timestamp with time zone</type>
+					<type>varchar</type>
 					<constraint></constraint>
 					<default_value></default_value>
 					<auto_increment>false</auto_increment>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>25</word_id>
+					<word_id>8</word_id>
 					<id>58</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 					</sequence>
 				</normal_column>
 				<normal_column>
-					<word_id>50</word_id>
+					<word_id>7</word_id>
 					<id>59</id>
 					<description></description>
 					<unique_key_name></unique_key_name>
 					<logical_name></logical_name>
 					<physical_name></physical_name>
-					<type>timestamp with time zone</type>
+					<type>varchar</type>
 					<constraint></constraint>
-					<default_value>transaction_timestamp()</default_value>
+					<default_value></default_value>
 					<auto_increment>false</auto_increment>
 					<foreign_key>false</foreign_key>
 					<not_null>false</not_null>
 				<inidex>
 					<full_text>false</full_text>
 					<non_unique>true</non_unique>
-					<name>virustotal_reports_binary_id_idx</name>
+					<name>virustotal_results_report_id_idx</name>
 					<type></type>
 					<description></description>
 					<columns>
 						<column>
-							<id>53</id>
+							<id>55</id>
 							<desc>true</desc>
 						</column>
 					</columns>

schema/hbbackend.sql

 DROP INDEX IF EXISTS ASN_SHADOWSERVER_IP_IDX;
 DROP INDEX IF EXISTS GEOIP_SHADOWSERVER_IP_IDX;
 DROP INDEX IF EXISTS VIRUSTOTAL_REPORTS_BINARY_ID_IDX;
+DROP INDEX IF EXISTS VIRUSTOTAL_RESULTS_REPORT_ID_IDX;
 
 
 
 CREATE INDEX ASN_SHADOWSERVER_IP_IDX ON ASN_SHADOWSERVER (IP);
 CREATE INDEX GEOIP_SHADOWSERVER_IP_IDX ON GEOIP_SHADOWSERVER (IP);
 CREATE INDEX VIRUSTOTAL_REPORTS_BINARY_ID_IDX ON VIRUSTOTAL_REPORTS (BINARY_ID);
+CREATE INDEX VIRUSTOTAL_RESULTS_REPORT_ID_IDX ON VIRUSTOTAL_RESULTS (REPORT_ID);
 
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.