Changeset 4809


Ignore:
Timestamp:
Mar 13, 2009, 11:37:26 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

References #903: Experiment Explorer is slow

Sort positions in ascending order.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/ExperimentExplorer.java

    r4808 r4809  
    6767import net.sf.basedb.core.query.Restriction;
    6868import net.sf.basedb.core.query.Restrictions;
     69import net.sf.basedb.core.query.Select;
    6970import net.sf.basedb.core.query.Selects;
    7071import net.sf.basedb.core.query.SqlResult;
     
    846847  {
    847848    DynamicSpotQuery reporterQuery = getBioAssaySet(dc).getSpotData();
     849    Select position = Dynamic.select(VirtualTable.SPOT, VirtualColumn.POSITION);
    848850    reporterQuery.joinReporters(JoinType.LEFT);
    849851    reporterQuery.select(Dynamic.select(VirtualTable.POSITION, VirtualColumn.REPORTER_ID));
    850     reporterQuery.select(Dynamic.select(VirtualTable.SPOT, VirtualColumn.POSITION));
     852    reporterQuery.select(position);
    851853    ItemContext cc = dc.getSessionControl().getCurrentContext(Item.REPORTER, getSubContext(), null);
    852854    cc.configureQuery(dc, reporterQuery, null);
     855    reporterQuery.order(Orders.asc(Expressions.selected(position)));
    853856    reporterQuery.setDistinct(true);
    854857    reporterQuery.setMaxResults(-1);
Note: See TracChangeset for help on using the changeset viewer.