Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #1184 (closed)

Opened 15 years ago

Closed 15 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 15 years ago by atarkowska

  • Description modified (diff)

comment:2 Changed 15 years ago by atarkowska

test - r3673

comment:3 Changed 15 years ago by atarkowska

  • Priority changed from minor to critical

comment:4 Changed 15 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 15 years ago by atarkowska

  • Resolution set to fixed
  • Status changed from new to closed

It seems to be pretty fast. THX

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.63945 sec.)

We're Hiring!