Solution for ZEOS 6.6.6 with >= FPC2.5.x

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

msv,

do you use svn? Zeos is ready prepared for these compillers...

Michael
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
sem-evgen
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 18.11.2012, 21:37

Post by sem-evgen »

I don't know where i can ask question and i decide to write that here. Recently i had update FPC to versiov 2.6 and LAZARUS to 1.0.2 and got problem with project compilation. Then i update zeos to 7.0 beta, project successfully compiled but i see that some queries to Postgresql DB became about 7 times slow than with my 6.6.6 version. I've tested last 6.6.6 from svn, it works same slowly as 7.0 beta
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

sem-evgen,

maybe you use the current Version wrong i think. Zeos7 has an CAPI for PostgreSQL too. I dont wanna write everything again. Have a look here: http://zeos.firmos.at/viewtopic.php?p=16574#16574

And tell me if these instruction solve this isse. I personally can't believe such an speed decrease from FPC or Zeos-Side. Only some Settings can be different.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
sem-evgen
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 18.11.2012, 21:37

Post by sem-evgen »

Thank you, it works.
sem-evgen
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 18.11.2012, 21:37

Post by sem-evgen »

Sorry, but i mixed up old and new executable files, and now i understand that execution with new compiler and new zeos still slow with SELECT query
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

sem-evgen,

sure you use FPC2.6? Not FPC2.7 which really currently is slower..

What is different? You wrote you've updated to FPC2.6 and you speed was equal slow with Zeos6.6 and Zeos7. Previously you used Zeos6 too but an older compiler. Is this right?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
sem-evgen
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 18.11.2012, 21:37

Post by sem-evgen »

SQL query looks like:

Code: Select all

SELECT (SELECT firstname FROM users WHERE users.id = history_1815.executorid) as fname, (SELECT secondname FROM users WHERE users.id = history_1815.executorid) as sname, (SELECT thirdname FROM users WHERE users.id = history_1815.executorid) as tname, id, direction, executorid, event, nexteventid, to_char(date,'DD.MM.YYYY') as date,to_char(nextdate,'DD.MM.YYYY') as nextdate FROM history_1815 ORDER BY id
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

sem-evgen,

such a simple query should be sooo much slower? I can't believe that.

Why do you to_char? Another format?

Can you please tell me again the exact changes you made with FPC and Zeos? Did you change the Server too?

Which settings on TZConnection you had before and which are used currently?
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
sem-evgen
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 18.11.2012, 21:37

Post by sem-evgen »

I used fpc 2.4.3 and zeos 6.6.6 which i download when it was released with this set "SELECT" works fast.
I update fpc to 2.6.0 and can't compile executable, i download zeos 7.0 beta, compile, test it and see that quary is slow.
i download lastest zeos 6.6.6 from svn and compile executable with 2.4.3 and then 2.6.0, it both cases query is slow, now i rollback to 2.4.3 and old zeos 6.6.6, but i realy want to use new version of compiler and zeos.
sem-evgen
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 18.11.2012, 21:37

Post by sem-evgen »

i have create component dynamically

Code: Select all

FConnection := TZConnection.Create(nil);
  FConnection.Protocol:=   'postgresql-8';
  FConnection.HostName:=   POSTGRESQLIP;
  FConnection.Port:=       POSTGRESQLPORT;
  FConnection.User:=       DBUSR;
  FConnection.Password:=   DBPASS;
  FCOnnection.Database:=   DBNAME;
  FSQLQuery :=             TZQuery.Create(nil);
  FSQLQuery.Connection :=  FConnection;      
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

sem-evgen,

now i'm totaly confused:
!:
I used fpc 2.4.3 and zeos 6.6.6 which i download when it was released with this set "SELECT" works fast.
To be clear: you use FPC2.4.3 + Zeos6.6.6 (where did you download this one?)

2:
2.6.0 and can't compile executable, i download zeos 7.0 beta, compile, test it and see that quary is slow.
3:
OK you use both compliers and again Zeos 6.6.6 but this times you say it's slow.

So i don't understand the differences between Point 1 and 3.

AFIAK nothing has been changed. But this can be wrong. So i want to know where Z6 of Point1 is from. Then i can make a diff and see if something has been changed i don't know.

now you use FPC2.4.3 + Zeos7



i download lastest zeos 6.6.6 from svn and compile executable with 2.4.3 and then 2.6.0, it both cases query is slow
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Zoran
Senior Boarder
Senior Boarder
Posts: 55
Joined: 07.05.2010, 22:32

Post by Zoran »

Perhaps in point 1 (zeos 6.6.6 which i download when it was released) he means the he had used "stable", and in point 3 (lastest zeos 6.6.6 from svn) the "patches" branch?
http://svn.code.sf.net/p/zeoslib/code-0 ... .6-stable/
http://svn.code.sf.net/p/zeoslib/code-0 ... 6-patches/
sem-evgen
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 18.11.2012, 21:37

Post by sem-evgen »

Yes, Zoran right. I don't know how i can do diff between all source files of Zeos. Now i use FPC 2.4.3 + ZEOS 6.6.6 stable
Zoran
Senior Boarder
Senior Boarder
Posts: 55
Joined: 07.05.2010, 22:32

Post by Zoran »

sem-evgen wrote:Yes, Zoran right. I don't know how i can do diff between all source files of Zeos. Now i use FPC 2.4.3 + ZEOS 6.6.6 stable
This svn command:

Code: Select all

svn diff http://svn.code.sf.net/p/zeoslib/code-0/tags/6.6.6-stable/ http://svn.code.sf.net/p/zeoslib/code-0/branches/6.6-patches/ > zeos.diff
will give you that.

However, this is not very useful, as the zeos.diff file will contain too much.

Instead, you'd better locate the revision which caused this slowdown. This is how you should do it:

Checkout the patches branch to your pc. Update to some revision halfway between the time when the 6.6.6 stable was released (it seems to be around rev. 753) and now (2053 at the moment).
Something like this:

Code: Select all

svn update -r 1200
Test if your query is slow with this revision. If it is, then the bug appeared before that, otherwise after. Write down which revision it was and update to one halfway, either towards the stable, or towards now. Repeat this process until you locate the exact revision number when the slowdown of the query appears.

Then post here the revision number in which the bug appeared.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post by EgonHugeist »

sem-evgen,

Voran is competely right. A diff which contains to many changes is lese hepfull. But exacly this is all i can do. My plan was to checkout the 6.6.6-patches repo then ovewrite a files with the older stable release and check the differences. IMHO can't there be too much changes(hope so) because the patches repository is a bugfix branch.

I hope i can do this the next evenings.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply