Skip to content

Instantly share code, notes, and snippets.

@grimradical
Created November 9, 2012 21:35
Show Gist options
  • Save grimradical/4048413 to your computer and use it in GitHub Desktop.
Save grimradical/4048413 to your computer and use it in GitHub Desktop.
explain analyze select results.* from (SELECT certname_catalogs.certname, catalog_resources.resource, catalog_resources.type, catalog_resources.title,catalog_resources.tags, catalog_resources.exported, catalog_resources.sourcefile, catalog_resources.sourceline, rp.name, rp.value FROM catalog_resources JOIN certname_catalogs USING(catalog) LEFT OUTER JOIN resource_params rp USING(resource) INNER JOIN certnames ON certname_catalogs.certname = certnames.name WHERE (catalog_resources.type = 'Sshkey') AND (catalog_resources.exported = true) AND (certnames.deactivated IS NULL) AND (NOT ((certname_catalogs.certname = 'any node name here'))) AND (catalog_resources.resource IN (SELECT rp.resource FROM resource_params rp WHERE rp.name = 'type' AND rp.value = '"rsa"'))) results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment