-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from sbesson/memoregenerator_setId_order
Improve fileset distribution during the memo file regeneration
- Loading branch information
Showing
2 changed files
with
47 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
COPY (SELECT * FROM ( | ||
SELECT image.id AS imageId, | ||
pixels.id AS pixelsId, | ||
image.series, | ||
pixelstype.value AS pixelstype, | ||
pixels.sizeX, | ||
pixels.sizeY, | ||
pixels.sizeZ, | ||
pixels.sizeC, | ||
pixels.sizeT, | ||
format.value, | ||
rank() OVER (PARTITION BY fileset.id ORDER BY image.id) AS rank | ||
FROM fileset | ||
JOIN image ON fileset.id = image.fileset | ||
JOIN pixels ON image.id = pixels.image | ||
JOIN pixelstype ON pixels.pixelstype = pixelstype.id | ||
JOIN format ON image.format = format.id | ||
) AS rank WHERE rank.rank = 1) TO STDOUT CSV; | ||
COPY (SELECT * FROM ( | ||
SELECT image.id AS imageId, | ||
pixels.id AS pixelsId, | ||
image.series, | ||
pixelstype.value AS pixelstype, | ||
pixels.sizeX, | ||
pixels.sizeY, | ||
pixels.sizeZ, | ||
pixels.sizeC, | ||
pixels.sizeT, | ||
format.value, | ||
e2.time - e1.time AS setId, | ||
rank() OVER (PARTITION BY fileset.id ORDER BY image.id) AS rank | ||
FROM fileset | ||
JOIN image ON fileset.id = image.fileset | ||
JOIN pixels ON image.id = pixels.image | ||
JOIN pixelstype ON pixels.pixelstype = pixelstype.id | ||
JOIN format ON image.format = format.id | ||
JOIN event e2 on image.creation_id=e2.id | ||
JOIN filesetjoblink on filesetjoblink.parent=fileset.id | ||
JOIN job on filesetjoblink.child=job.id | ||
JOIN uploadjob on job.id=uploadjob.job_id | ||
JOIN event e1 on job.update_id=e1.id | ||
) AS query WHERE query.rank = 1 ORDER BY query.setId desc) TO STDOUT CSV; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters