Looks good, especially if it's 100 times faster!
If you want to use Storm syntax, it may work just as well to use an IN query:
SELECT POFile.* FROM POFile WHERE POFile.potemplate IN ( SELECT potemplate FROM TranslationTemplateItem WHERE potmsgset = 1 AND sequence > 0) LIMIT 1;
If PostgreSQL is sensible it will optimize that. But, to be honest, if what you've got works, use it and ignore me :)
« Back to merge proposal
Looks good, especially if it's 100 times faster!
If you want to use Storm syntax, it may work just as well to use an IN
query:
SELECT POFile.* lateItem
FROM POFile
WHERE POFile.potemplate IN (
SELECT potemplate
FROM TranslationTemp
WHERE potmsgset = 1
AND sequence > 0)
LIMIT 1;
If PostgreSQL is sensible it will optimize that. But, to be honest, if
what you've got works, use it and ignore me :)