Recent

Author Topic: How to improve the speed of TSQLconecctor? (Postgres)  (Read 2102 times)

cpalx

  • Hero Member
  • *****
  • Posts: 642
How to improve the speed of TSQLconecctor? (Postgres)
« on: July 31, 2014, 08:01:39 pm »
Lazarus 1.2.4
FPC 2.6.4
Tested: Windows/Linux

I changed Zeos 7.1.3 to TSQLconnector

The application makes a remote server conection, every Query, Insert, Update works, but there is one special problem:
With the same Server, Database; the same client and same Internet speed (so slow 1.0Mb at 15%)
the application compiled with Zeos open a window with several query in 4s and the application compiled with TSQLconector open the same window in 21s.

i know i can improve the querys  making a Store Procedure, but the question is how make it work at the same speed

Transaction in TSQLconector has caCommitRetaining, because i need to see other querys that are displaying in a DBgrid.

additonal information: the Window make 6 sequencial querys in the OnFormShow event.

 I will thank any help

--
Christian

 

goodname

  • Sr. Member
  • ****
  • Posts: 297
Re: How to improve the speed of TSQLconecctor? (Postgres)
« Reply #1 on: August 02, 2014, 06:41:48 pm »
I would guess that this had to do with transaction handling. Try changing the Zeos transaction settings and see what happens.
http://www.freepascal.org/docs-html/fcl/sqldb/tsqltransaction.action.html

cpalx

  • Hero Member
  • *****
  • Posts: 642
Re: How to improve the speed of TSQLconecctor? (Postgres)
« Reply #2 on: August 04, 2014, 07:22:30 pm »
but Zeos is not the problem, the problem is with TSQLconector

goodname

  • Sr. Member
  • ****
  • Posts: 297
Re: How to improve the speed of TSQLconecctor? (Postgres)
« Reply #3 on: August 04, 2014, 07:37:59 pm »
Yes but setting TSQLTransaction.action does nothing in SQLdb. There is always an open transaction for all open queries in SQLdb. If you can show that the performance difference is due to transaction handling then there would be a motivation to improve it. The best way that I can think of showing this is to get Zeos to perform as poorly and the only difference being transaction handling.

Addition: Manually calling CommitRetaining after opening the select queries in the OnFormShow event may simulate the caCommitRetaining setting.
« Last Edit: August 04, 2014, 09:56:43 pm by goodname »

 

TinyPortal © 2005-2018