Bug #1184 (closed)
Opened 16 years ago
Closed 16 years ago
Slow query ?
Reported by: | atarkowska | Owned by: | jamoore |
---|---|---|---|
Priority: | critical | Cc: | |
Sprint: | n.a. | ||
Total Remaining Time: | n.a. |
Description (last modified by atarkowska)
I add pagination to the webclient but still the query seems to be 'slow'. Select was done on the dataset with 2440 images.
Slow means: start time: 2009-02-14 14:17:51.372902, end time: 2009-02-14 14:18:12.784592, or maybe 21sec is ok ;-)
import omero import time from omero.rtypes import * ds_id = 56 page = 1 c = omero.client("mage", 4063) c.createSession("jason", password) #c.joinSession("08c9796e-6fa7-4d1b-9683-68d64fc6add0") admin_serv = c.sf.getAdminService() query_serv = c.sf.getQueryService() cx = admin_serv.getEventContext() p = omero.sys.Parameters() p.map = {} p.map["eid"] = rlong(cx.userId) p.map["oid"] = rlong(ds_id) if page is not None: f = omero.sys.Filter() f.limit = rint(24) f.offset = rint((int(page)-1)*24) p.theFilter = f sql = "select im from Image im join fetch im.details.owner join fetch im.details.group " \ "left outer join fetch im.datasetLinks dil left outer join fetch dil.parent d " \ "where d.id = :oid and im.details.owner.id=:eid order by im.id asc" print datetime.datetime.now() print len(query_serv.findAllByQuery(sql,p)) print datetime.datetime.now() c.sf.closeOnDestroy()
Change History (5)
comment:1 Changed 16 years ago by atarkowska
- Description modified (diff)
comment:2 Changed 16 years ago by atarkowska
comment:3 Changed 16 years ago by atarkowska
- Priority changed from minor to critical
comment:4 Changed 16 years ago by jmoore
In r3744 the test passed at under 1 second, Ola. Can you try to reproduce? Perhaps it was an artifact of all the connection silliness.
comment:5 Changed 16 years ago by atarkowska
- Resolution set to fixed
- Status changed from new to closed
It seems to be pretty fast. THX
test - r3673