Page 2 of 3

Posted: 26.06.2012, 13:52
by EgonHugeist
msv,

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

Michael

Posted: 18.11.2012, 21:59
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

Posted: 18.11.2012, 23:11
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.

Posted: 20.11.2012, 21:44
by sem-evgen
Thank you, it works.

Posted: 25.11.2012, 15:41
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

Posted: 25.11.2012, 15:46
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?

Posted: 25.11.2012, 15:54
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

Posted: 25.11.2012, 17:03
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?

Posted: 26.11.2012, 19:58
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.

Posted: 26.11.2012, 20:00
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;      

Posted: 26.11.2012, 23:45
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

Posted: 27.11.2012, 10:25
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/

Posted: 27.11.2012, 17:42
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

Posted: 28.11.2012, 08:20
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.

Posted: 28.11.2012, 13:27
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.