CREATE INDEX Group_Index ON Groups (GroupName);

CREATE INDEX Hardware_Index ON Hardware (DiscoveredHostName, FQDN, NetBIOS, ScanIP);

CREATE INDEX IP_Address_Index ON IP_Addresses (IP_Address);

CREATE INDEX MAC_Address_Index ON MAC_Addresses (MAC_Address);

CREATE INDEX PortsProtocolsServices_Index ON PortsProtocolsServices (Port, Protocol, DiscoveredServiceName);

CREATE INDEX DiscoveredSoftwareName_Index ON Software (DiscoveredSoftwareName);

CREATE INDEX FindingSourceFileName_Index ON UniqueFindingsSourceFiles (FindingSourceFileName);

CREATE INDEX UniqueVulnerabilityIdentifier_Index ON Vulnerabilities (UniqueVulnerabilityIdentifier);

CREATE INDEX VulnerabilityTitleDescriptionPrimaryRisk_Index ON Vulnerabilities (
                                                                         UniqueVulnerabilityIdentifier,
                                                                         VulnerabilityTitle,
                                                                         VulnerabilityDescription,
                                                                         PrimaryRawRiskIndicator
    );

CREATE INDEX VulnerabilityTitleDescriptionSecondaryRisk_Index ON Vulnerabilities (
                                                                         UniqueVulnerabilityIdentifier,
                                                                         VulnerabilityTitle,
                                                                         VulnerabilityDescription,
                                                                         SecondaryRawRiskIndicator
    );

CREATE INDEX VulnerabilityReference_Index ON VulnerabilityReferences (Reference, ReferenceType);

CREATE INDEX VulnerabilitySource_Index ON VulnerabilitySources (SourceName, SourceVersion, SourceRelease);

CREATE INDEX FindingType_Index ON FindingTypes (FindingType);

CREATE INDEX FK_UniqueFindingsFindingType_ID_Index ON UniqueFindings (FindingType_ID);

CREATE INDEX FK_UniqueFindingsVulnerability_ID_Index ON UniqueFindings (Vulnerability_ID);

CREATE INDEX FK_UniqueFindingsHardware_ID_Index ON UniqueFindings (Hardware_ID);

CREATE INDEX FK_UniqueFindingsFindingSourceFile_ID_Index ON UniqueFindings (FindingSourceFile_ID);

CREATE INDEX FK_VulnerabilitiesCCIsVulnerability_ID_Index ON VulnerabilitiesCCIs (Vulnerability_ID);

CREATE INDEX FK_VulnerabilitiesCCIsCCI_ID_Index ON VulnerabilitiesCCIs (CCI_ID);

CREATE INDEX FK_NistControlsCCIsNIST_Control_ID_Index ON NIST_ControlsCCIs (NIST_Control_ID);

CREATE INDEX FK_NistControlsCCIsCCI_ID_Index ON NIST_ControlsCCIs (CCI_ID);

CREATE INDEX FK_VulnerabilitiesVulnerabilitySourcesVulnerability_ID_Index ON VulnerabilitiesVulnerabilitySources (Vulnerability_ID);

CREATE INDEX FK_VulnerabilitiesVulnerabilitySourcesVulnerabilitySource_ID_Index ON VulnerabilitiesVulnerabilitySources (VulnerabilitySource_ID);