Performance on load records

Hello,
I have the following query:

var query = "select ac.id_anal, ac.id_exm, ac.lin_exm  from analisis an, ancompex ac, granexam gr where an.id_anal = ac.id_anal and ac.id_exm = gr.id_exm and an.fec_anal > ? and an.fec_anal < ?"
	query += "and an.hora_anal > ? and an.hora_anal < ?"
	var arg = new Array()
	arg[0]= fechaDesde
	arg[1]= fechaHasta
	arg[2]= horaDesde
	arg[3]= horaHasta
	var ds = databaseManager.getDataSetByQuery("pruebadbf",query,arg,-1)
	if(ds.getMaxRowIndex() > 0)
	{
		forms.frm_informe_de_sector_list.foundset.loadRecords(ds)
 plugins.jasperPluginRMI.runReport(forms.frm_informe_de_sector_list.foundset,"exmporsector.jasper",null,"view",null)

	}

When we load the records obtained in the dataset (foundset.loadRecords(ds)) it takes excesive time, we are talking about mitnutes.
The records collected by the query are not too much () and when the query is prerfomed it doesnt take so long. The problem is when the recodrs are loaded in the form.
The table which is based the form (forms.frm_informe_de_sector_list) is huge but we have already selected the records that we need by " databaseManager.getDataSetByQuery(“pruebadbf”,query,arg,-1)" Why it take too long??

There are other way to pass the founset to jasper report faster??
We cant use relation to select the data instead of databaseManager.getDataSetByQuery because we cant put in globals variables the user data used to filter the information.
Thank you for your help

mo_ca_mo,

You can fill a foundset with these details directly.
Either with a relation from analisis to ancompex on id_anal and 4 globals to fill in the details.
Or, with a simple relation from analisis to ancompex on id_anal and 2 related searches on analisis_to_ancompex.fec_anal = ‘…’

That does not explain why the loading is slow.
If you do a foundset.loadRecords(ds), Servoy will do a query for the values: select col1, col2, … where pk in (? ,?, …, ?)
This should be fast as it is on the pk which usually has an index.
If there is a table filter applied to the table, Servoy will do an intermediate query first to validate the pks in the dataset against the filter:
select pk from tab where and pk in (? ,?, …, ?).

From the admin pages you can see which query actually takes the time.

Rob

PS, you are joining on granexam in your query but you are not actually using anyting from it

im having the same problem, i first tryied to solve this using a global relation but it was way too slow, so i tried this instead

globals.lin_exm_tmp_Hist = forms.frm_analisis_historico.lin_exm
	globals.idAnalisis_Hist = forms.frm_analisis_historico.id_anal
	
	var query = "select id_anal, id_exm, lin_exm from resultados where id_anal = ? and lin_exm = ?"
	var args = new Array()
	args[0]= globals.idAnalisis_Hist
	args[1] = globals.lin_exm_tmp_Hist
	var ds = databaseManager.getDataSetByQuery("geslab",query,args,-1)
	forms.frm_resultados_historicos.foundset.clear()
	forms.frm_resultados_historicos.controller.loadRecords(ds)

it was also really slow and when i debug this, its all really fast until the loadRecords(), thats when i takes like 2 or 3 minutes to load. What could be the problem? i have an index on id_anal, lin_exm

im using servoy 6 and working on DBFs

nromeou,

Do you have a table filter on the base table of the frm_resultados_historicos form?
In that case, Servoy will reload the pks in the db based on the pks passed in to check if all records in the dataset match the filter condition.

Rob

No i dont, no filters, nothing
i have that form with a separate foundset and in an unrelated tab panel on another form, thats it.
I dumped the stack, perhaps it tells you something, on the server performance data says no queries are running

Current time: Thu Sep 29 11:45:11 GMT-02:00 2011

Server Information
Servoy version 6.0.0 -build 1217
Port used by RMI Registry: 1099
Repository version 40

Current time: Thu Sep 29 11:45:11 GMT-02:00 2011

Uptime:  1 hour 28 minutes 7 seconds

JDK Information
java.vm.name=Java HotSpot(TM) Client VM
java.version=1.6.0_26
java.vm.info=mixed mode, sharing
java.vm.vendor=Sun Microsystems Inc.

Operating System Information
os.name=Windows XP
os.version=5.1
os.arch=x86

System Information
Heap Space Memory: allocated=218716K, used=150308K, max=506816K
Non-Heap Space Memory: allocated=137056K, used=126467K, max=317440K

Thread: http-8080-1, state: RUNNABLE, total cpu time: 390.625ms, total user time: 375.0ms
  sun.management.ThreadImpl.getThreadInfo1(Native Method)
  sun.management.ThreadImpl.getThreadInfo(Unknown Source)
  sun.management.ThreadImpl.getThreadInfo(Unknown Source)
  com.servoy.j2db.server.servlets.ConfigServlet.Zt(ConfigServlet.java:307)
  com.servoy.j2db.server.servlets.ConfigServlet.service(ConfigServlet.java:364)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
  org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  java.lang.Thread.run(Unknown Source)

Thread: Worker-31, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:185)
  org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:217)
  org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)

Thread: Worker-30, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:185)
  org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:217)
  org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)

Thread: Timer-12, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: Worker-28, state: TIMED_WAITING, total cpu time: 46.875ms, total user time: 31.25ms
  java.lang.Object.wait(Native Method)
  org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:185)
  org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:217)
  org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)

Thread: Worker-27, state: WAITING, total cpu time: 31.25ms, total user time: 31.25ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.dltk.dbgp.internal.packets.DbgpPacketReceiver$ResponcePacketWaiter.waitPacket(DbgpPacketReceiver.java:52)
  org.eclipse.dltk.dbgp.internal.packets.DbgpPacketReceiver.getResponsePacket(DbgpPacketReceiver.java:166)
  org.eclipse.dltk.dbgp.internal.DbgpDebugingEngine.getResponsePacket(DbgpDebugingEngine.java:94)
  org.eclipse.dltk.dbgp.internal.commands.DbgpDebuggingEngineCommunicator.receiveResponse(DbgpDebuggingEngineCommunicator.java:44)
  org.eclipse.dltk.dbgp.internal.commands.DbgpDebuggingEngineCommunicator.communicate(DbgpDebuggingEngineCommunicator.java:69)
  org.eclipse.dltk.dbgp.DbgpBaseCommands.communicate(DbgpBaseCommands.java:43)
  org.eclipse.dltk.dbgp.internal.commands.DbgpContinuationCommands.execCommand(DbgpContinuationCommands.java:35)
  org.eclipse.dltk.dbgp.internal.commands.DbgpContinuationCommands.stepOver(DbgpContinuationCommands.java:55)
  org.eclipse.dltk.dbgp.internal.commands.DbgpCoreCommands.stepOver(DbgpCoreCommands.java:149)
  org.eclipse.dltk.internal.debug.core.model.operations.DbgpStepOverOperation.process(DbgpStepOverOperation.java:23)
  org.eclipse.dltk.internal.debug.core.model.operations.DbgpOperation$1.run(DbgpOperation.java:64)
  org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Thread: Worker-26, state: TIMED_WAITING, total cpu time: 31.25ms, total user time: 31.25ms
  java.lang.Object.wait(Native Method)
  org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:185)
  org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:217)
  org.eclipse.core.internal.jobs.Worker.run(Worker.java:50)

Thread: Timer-11, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: Timer-10, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: Timer-9, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: Timer-8, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: Timer-7, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: pool-3-thread-19, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  sun.misc.Unsafe.park(Native Method)
  java.util.concurrent.locks.LockSupport.park(Unknown Source)
  java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
  java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: pool-3-thread-18, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  sun.misc.Unsafe.park(Native Method)
  java.util.concurrent.locks.LockSupport.park(Unknown Source)
  java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
  java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: pool-3-thread-17, state: WAITING, total cpu time: 31.25ms, total user time: 31.25ms
  sun.misc.Unsafe.park(Native Method)
  java.util.concurrent.locks.LockSupport.park(Unknown Source)
  java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
  java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: pool-3-thread-16, state: WAITING, total cpu time: 78.125ms, total user time: 78.125ms
  sun.misc.Unsafe.park(Native Method)
  java.util.concurrent.locks.LockSupport.park(Unknown Source)
  java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
  java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: Timer-1, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: Lookup ValueList Timer, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: pool-2-thread-2, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  sun.misc.Unsafe.park(Native Method)
  java.util.concurrent.locks.LockSupport.park(Unknown Source)
  java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
  java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: FormCache Monitor, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Thread.sleep(Native Method)
  com.servoy.j2db.server.headlessclient.dataui.TemplateGenerator$FormCache$1.run(TemplateGenerator.java:127)
  java.lang.Thread.run(Unknown Source)

Thread: DBGP - Stream manager, state: WAITING, total cpu time: 15.625ms, total user time: 15.625ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.dltk.dbgp.internal.packets.DbgpPacketReceiver$PacketWaiter.waitPacket(DbgpPacketReceiver.java:91)
  org.eclipse.dltk.dbgp.internal.packets.DbgpPacketReceiver.getStreamPacket(DbgpPacketReceiver.java:161)
  org.eclipse.dltk.dbgp.internal.DbgpDebugingEngine.getStreamPacket(DbgpDebugingEngine.java:84)
  org.eclipse.dltk.dbgp.internal.managers.DbgpStreamManager.workingCycle(DbgpStreamManager.java:45)
  org.eclipse.dltk.dbgp.internal.DbgpWorkingThread$1.run(DbgpWorkingThread.java:29)
  java.lang.Thread.run(Unknown Source)

Thread: DBGP - Notification Manager, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.dltk.dbgp.internal.packets.DbgpPacketReceiver$PacketWaiter.waitPacket(DbgpPacketReceiver.java:91)
  org.eclipse.dltk.dbgp.internal.packets.DbgpPacketReceiver.getNotifyPacket(DbgpPacketReceiver.java:157)
  org.eclipse.dltk.dbgp.internal.DbgpDebugingEngine.getNotifyPacket(DbgpDebugingEngine.java:89)
  org.eclipse.dltk.dbgp.internal.managers.DbgpNotificationManager.workingCycle(DbgpNotificationManager.java:37)
  org.eclipse.dltk.dbgp.internal.DbgpWorkingThread$1.run(DbgpWorkingThread.java:29)
  java.lang.Thread.run(Unknown Source)

Thread: Debug command reader, state: RUNNABLE, total cpu time: 593.75ms, total user time: 546.875ms
  java.net.SocketInputStream.socketRead0(Native Method)
  java.net.SocketInputStream.read(Unknown Source)
  java.net.SocketInputStream.read(Unknown Source)
  java.io.FilterInputStream.read(Unknown Source)
  org.eclipse.dltk.rhino.dbgp.DBGPDebugger.run(DBGPDebugger.java:505)

Thread: DBGP - Packet receiver, state: RUNNABLE, total cpu time: 750.0ms, total user time: 703.125ms
  java.net.SocketInputStream.socketRead0(Native Method)
  java.net.SocketInputStream.read(Unknown Source)
  java.io.BufferedInputStream.fill(Unknown Source)
  java.io.BufferedInputStream.read(Unknown Source)
  org.eclipse.dltk.dbgp.internal.DbgpRawPacket.readPacketSize(DbgpRawPacket.java:28)
  org.eclipse.dltk.dbgp.internal.DbgpRawPacket.readPacket(DbgpRawPacket.java:75)
  org.eclipse.dltk.dbgp.internal.packets.DbgpPacketReceiver.workingCycle(DbgpPacketReceiver.java:123)
  org.eclipse.dltk.dbgp.internal.DbgpWorkingThread$1.run(DbgpWorkingThread.java:29)
  java.lang.Thread.run(Unknown Source)

Thread: Script Debug accept thread, state: RUNNABLE, total cpu time: 0.0ms, total user time: 0.0ms
  java.net.PlainSocketImpl.socketAccept(Native Method)
  java.net.PlainSocketImpl.accept(Unknown Source)
  java.net.ServerSocket.implAccept(Unknown Source)
  java.net.ServerSocket.accept(Unknown Source)
  com.servoy.j2db.debug.RemoteDebugScriptEngine$1.run(RemoteDebugScriptEngine.java:85)
  java.lang.Thread.run(Unknown Source)

Thread: org.eclipse.dltk.internal.ui.text.ScriptReconciler, state: TIMED_WAITING, total cpu time: 10250.0ms, total user time: 10250.0ms
  java.lang.Object.wait(Native Method)
  org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:179)

Thread: Swing-Shell, state: WAITING, total cpu time: 171.875ms, total user time: 31.25ms
  sun.misc.Unsafe.park(Native Method)
  java.util.concurrent.locks.LockSupport.park(Unknown Source)
  java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
  java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: TimerQueue, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  javax.swing.TimerQueue.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: AWT-EventQueue-0, state: RUNNABLE, total cpu time: 215656.25ms, total user time: 212734.375ms
  com.hxtt.d.l.a(Unknown Source)
  com.hxtt.d.l.a(Unknown Source)
  com.hxtt.d.j.a(Unknown Source)
  com.hxtt.d.l.if(Unknown Source)
  com.hxtt.d.c.a(Unknown Source)
  com.hxtt.d.l.if(Unknown Source)
  com.hxtt.d.c.a(Unknown Source)
  com.hxtt.d.l.if(Unknown Source)
  com.hxtt.d.l.do(Unknown Source)
  com.hxtt.sql.ck.a(Unknown Source)
  com.hxtt.sql.ck.a(Unknown Source)
  com.hxtt.sql.dl.a(Unknown Source)
  com.hxtt.sql.dl.a(Unknown Source)
  com.hxtt.sql.c3.new(Unknown Source)
  com.hxtt.sql.c3.next(Unknown Source)
  org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)
  org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)
  org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)
  org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:207)
  com.servoy.j2db.dataprocessing.Zu.createBufferedDataSet(Zu.java:590)
  com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:999)
  com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:1025)
  com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:980)
  com.servoy.j2db.dataprocessing.Zu.performQuery(Zu.java:65)
  sun.reflect.GeneratedMethodAccessor246.invoke(Unknown Source)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  java.lang.reflect.Method.invoke(Unknown Source)
  com.servoy.j2db.debug.SerializingDataserverProxy.invoke(SerializingDataserverProxy.java:91)
  $Proxy4.performQuery(Unknown Source)
  com.servoy.j2db.debug.ProfileDataServer.performQuery(ProfileDataServer.java:275)
  com.servoy.j2db.dataprocessing.RowManager.getRows(RowManager.java:459)
  com.servoy.j2db.dataprocessing.FoundSet.createRecord(FoundSet.java:2526)
  com.servoy.j2db.dataprocessing.FoundSet.getRecord(FoundSet.java:1931)
  com.servoy.j2db.dataprocessing.FoundSet.getRecord(FoundSet.java:1902)
  com.servoy.j2db.dataprocessing.FoundSet.loadExternalPKList(FoundSet.java:1613)
  com.servoy.j2db.FormController.loadData(FormController.java:2020)
  com.servoy.j2db.FormController$JSForm.js_loadRecords(FormController.java:381)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  java.lang.reflect.Method.invoke(Unknown Source)
  org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
  org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:361)
  org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
  org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
  org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
  org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
  org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3134)
  org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
  com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:518)
  com.servoy.j2db.debug.RemoteDebugScriptEngine.executeFunction(RemoteDebugScriptEngine.java:379)
  com.servoy.j2db.FormController.executeFunction(FormController.java:4051)
  com.servoy.j2db.FormController.executeFunction(FormController.java:3930)
  com.servoy.j2db.FormController.executeFunction(FormController.java:3852)
  com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3707)
  com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:271)
  com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:217)
  com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:212)
  com.servoy.j2db.smart.dataui.AbstractScriptButton$2.actionPerformed(AbstractScriptButton.java:660)
  javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
  javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
  javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
  javax.swing.DefaultButtonModel.setPressed(Unknown Source)
  javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
  java.awt.Component.processMouseEvent(Unknown Source)
  javax.swing.JComponent.processMouseEvent(Unknown Source)
  java.awt.Component.processEvent(Unknown Source)
  java.awt.Container.processEvent(Unknown Source)
  java.awt.Component.dispatchEventImpl(Unknown Source)
  java.awt.Container.dispatchEventImpl(Unknown Source)
  java.awt.Component.dispatchEvent(Unknown Source)
  java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
  java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
  java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
  java.awt.Container.dispatchEventImpl(Unknown Source)
  java.awt.Window.dispatchEventImpl(Unknown Source)
  java.awt.Component.dispatchEvent(Unknown Source)
  java.awt.EventQueue.dispatchEventImpl(Unknown Source)
  java.awt.EventQueue.access$000(Unknown Source)
  java.awt.EventQueue$1.run(Unknown Source)
  java.awt.EventQueue$1.run(Unknown Source)
  java.security.AccessController.doPrivileged(Native Method)
  java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
  java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
  java.awt.EventQueue$2.run(Unknown Source)
  java.awt.EventQueue$2.run(Unknown Source)
  java.security.AccessController.doPrivileged(Native Method)
  java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
  java.awt.EventQueue.dispatchEvent(Unknown Source)
  java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
  java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
  java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
  java.awt.EventDispatchThread.pumpEvents(Unknown Source)
  java.awt.EventDispatchThread.pumpEvents(Unknown Source)
  java.awt.EventDispatchThread.run(Unknown Source)

Thread: AWT-Shutdown, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  sun.awt.AWTAutoShutdown.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: SQLExplorerPlugin.ConnectionsTimer, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Thread.sleep(Native Method)
  net.sourceforge.sqlexplorer.plugin.SQLExplorerPlugin$ConnectionsTimer.run(SQLExplorerPlugin.java:70)

Thread: Java indexing, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:381)
  java.lang.Thread.run(Unknown Source)

Thread: org.eclipse.dltk.internal.ui.text.ScriptReconciler, state: TIMED_WAITING, total cpu time: 890.625ms, total user time: 859.375ms
  java.lang.Object.wait(Native Method)
  org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:179)

Thread: Timer-0, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.util.TimerThread.mainLoop(Unknown Source)
  java.util.TimerThread.run(Unknown Source)

Thread: Bundle File Closer, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397)
  org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333)

Thread: DLTK indexing, state: WAITING, total cpu time: 9812.5ms, total user time: 7281.25ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.dltk.internal.core.search.processing.JobManager.run(JobManager.java:445)
  java.lang.Thread.run(Unknown Source)

Thread: http-8080-Acceptor-0, state: RUNNABLE, total cpu time: 0.0ms, total user time: 0.0ms
  java.net.PlainSocketImpl.socketAccept(Native Method)
  java.net.PlainSocketImpl.accept(Unknown Source)
  java.net.ServerSocket.implAccept(Unknown Source)
  java.net.ServerSocket.accept(Unknown Source)
  org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
  org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:352)
  java.lang.Thread.run(Unknown Source)

Thread: ContainerBackgroundProcessor[StandardEngine[Catalina]], state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Thread.sleep(Native Method)
  org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1627)
  java.lang.Thread.run(Unknown Source)

Thread: ModificationWatcher Task, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Thread.sleep(Native Method)
  org.apache.wicket.util.time.Duration.sleep(Duration.java:445)
  org.apache.wicket.util.thread.Task$1.run(Task.java:130)
  java.lang.Thread.run(Unknown Source)

Thread: pool-2-thread-1, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  sun.misc.Unsafe.park(Native Method)
  java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
  java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
  java.util.concurrent.DelayQueue.take(Unknown Source)
  java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
  java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: PingScanner, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  com.servoy.j2db.dataprocessing.Zn.run(Zn.java:7)
  java.lang.Thread.run(Unknown Source)

Thread: MessageScheduler, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  com.servoy.j2db.dataprocessing.Zp.run(Zp.java:34)
  java.lang.Thread.run(Unknown Source)

Thread: MessagePreHandler, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  com.servoy.j2db.dataprocessing.ClientMessagePreQueueHandler.run(ClientMessagePreQueueHandler.java:50)
  java.lang.Thread.run(Unknown Source)

Thread: [ThreadPool Manager] - Idle Thread, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:106)

Thread: AWT-Windows, state: RUNNABLE, total cpu time: 843.75ms, total user time: 531.25ms
  sun.awt.windows.WToolkit.eventLoop(Native Method)
  sun.awt.windows.WToolkit.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: Java2D Disposer, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.ref.ReferenceQueue.remove(Unknown Source)
  java.lang.ref.ReferenceQueue.remove(Unknown Source)
  sun.java2d.Disposer.run(Unknown Source)
  java.lang.Thread.run(Unknown Source)

Thread: Worker-JM, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  org.eclipse.core.internal.jobs.InternalWorker.run(InternalWorker.java:58)

Thread: [Timer] - Main Queue Handler, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  org.eclipse.equinox.internal.util.impl.tpt.timer.TimerImpl.run(TimerImpl.java:141)
  java.lang.Thread.run(Unknown Source)

Thread: Framework Event Dispatcher, state: WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397)
  org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333)

Thread: Start Level Event Dispatcher, state: WAITING, total cpu time: 343.75ms, total user time: 296.875ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:397)
  org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:333)

Thread: State Data Manager, state: TIMED_WAITING, total cpu time: 0.0ms, total user time: 0.0ms
  java.lang.Thread.sleep(Native Method)
  org.eclipse.osgi.internal.baseadaptor.StateManager.run(StateManager.java:319)
  java.lang.Thread.run(Unknown Source)

Thread: Attach Listener, state: RUNNABLE, total cpu time: 0.0ms, total user time: 0.0ms

Thread: Signal Dispatcher, state: RUNNABLE, total cpu time: 0.0ms, total user time: 0.0ms

Thread: Finalizer, state: WAITING, total cpu time: 93.75ms, total user time: 93.75ms
  java.lang.Object.wait(Native Method)
  java.lang.ref.ReferenceQueue.remove(Unknown Source)
  java.lang.ref.ReferenceQueue.remove(Unknown Source)
  java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

Thread: Reference Handler, state: WAITING, total cpu time: 62.5ms, total user time: 62.5ms
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

Thread: main, state: RUNNABLE, total cpu time: 32609.375ms, total user time: 23937.5ms
  org.eclipse.swt.internal.win32.OS.WaitMessage(Native Method)
  org.eclipse.swt.widgets.Display.sleep(Display.java:4553)
  org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:364)
  org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.eventLoopIdle(IDEWorkbenchAdvisor.java:887)
  org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2641)
  org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
  org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
  org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
  org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
  org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
  org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
  org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
  org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
  org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
  org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
  org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  java.lang.reflect.Method.invoke(Unknown Source)
  org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
  org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
  org.eclipse.equinox.launcher.Main.run(Main.java:1408)

The time is taken by the query to find the data that belongs to the pks in the dataset.
So ‘select x, y, z where pk in (?, ?, …, ?)’
This query should show up in the performance data in the admin page.

Is the pk index missing on your table?

Rob