comparison artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 543:e9abf747f6ce

issue1847 Remove limit and break on empty ids
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 03 Sep 2015 17:45:16 +0200
parents 9497f58484a0
children 68f01f10624e
comparison
equal deleted inserted replaced
542:9497f58484a0 543:e9abf747f6ce
11 11
12 collection.items.artifact.id=SELECT artifact_id FROM collection_items 12 collection.items.artifact.id=SELECT artifact_id FROM collection_items
13 13
14 artifacts.outdated=SELECT id, factory, data, gid FROM artifacts WHERE ttl IS NOT NULL \ 14 artifacts.outdated=SELECT id, factory, data, gid FROM artifacts WHERE ttl IS NOT NULL \
15 AND CURRENT_TIMESTAMP - last_access > (ttl || ' milliseconds')::interval \ 15 AND CURRENT_TIMESTAMP - last_access > (ttl || ' milliseconds')::interval \
16 AND id NOT IN ($LOCKED_IDS$) \ 16 AND id NOT IN ($LOCKED_IDS$)
17 LIMIT 50
18 17
19 artifacts.select.gid=SELECT id, ttl, factory, data FROM artifacts WHERE gid = ?::uuid \ 18 artifacts.select.gid=SELECT id, ttl, factory, data FROM artifacts WHERE gid = ?::uuid \
20 AND (ttl IS NULL \ 19 AND (ttl IS NULL \
21 OR (CURRENT_TIMESTAMP - last_access <= (ttl || ' milliseconds')::interval) \ 20 OR (CURRENT_TIMESTAMP - last_access <= (ttl || ' milliseconds')::interval) \
22 OR id IN (SELECT artifact_id FROM collection_items)) 21 OR id IN (SELECT artifact_id FROM collection_items))

http://dive4elements.wald.intevation.org