Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2004
    Posts
    4

    Unanswered: Why is Postgresql on windows so slow

    Hi I am using postgrsql7.5 devel on windows xp, and it seems to work really slowly compared to other database systems.

    I tried different queires, and I expereineced, that a simple select * from table query from a table with 50 rows takes 2.2 seconds with the Postgrsql, and only around 0.1 seconds with mysql...

    Can anybody explain why is the difference so big?

    Thanks in advance,

    Peti

  2. #2
    Join Date
    Sep 2004
    Posts
    46

    slower

    It is known that PostgreSQL is slower than Mysql, but PostgreSQL have more more features than MySQL(trigger,views,transactions,stored procedures)

  3. #3
    Join Date
    Oct 2003
    Posts
    706
    All of that notwithstanding, when a trivial operation takes two seconds to complete, it's obviously not the fault of the SQL server in question. Something is obviously and terribly wrong.

    Now, what could be giving PostGres a really bad case of constipation? Probably some kind of configuration parameter is really-wrong. How much memory is the process using? During the query, what's the process waiting on? Use the system monitor to find out.

    Even Windows can do better than this!
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

  4. #4
    Join Date
    Apr 2003
    Posts
    23
    Quote Originally Posted by cristiu
    It is known that PostgreSQL is slower than Mysql, but PostgreSQL have more more features than MySQL(trigger,views,transactions,stored procedures)
    This is true only when you don't use transaction or multiple insertion/update.

  5. #5
    Join Date
    Sep 2004
    Posts
    4
    Quote Originally Posted by sundialsvcs
    All of that notwithstanding, when a trivial operation takes two seconds to complete, it's obviously not the fault of the SQL server in question. Something is obviously and terribly wrong.

    Now, what could be giving PostGres a really bad case of constipation? Probably some kind of configuration parameter is really-wrong. How much memory is the process using? During the query, what's the process waiting on? Use the system monitor to find out.

    Even Windows can do better than this!
    I checked whenever I query Postgresql, the processor is running on 100 %, there are no processes that it is waiting on... I could not check how much memory it is using, but there should be plenty available...

    So I still dont understand why is the difference so huge...

    Peti

  6. #6
    Join Date
    Sep 2004
    Posts
    4

    parameters

    which parameters should I check?

    Thanks,

    Peti

  7. #7
    Join Date
    Oct 2003
    Posts
    706
    100%-utilization is highly abnormal for a database engine. The process should spend most of its time in I/O-wait. If it's pegging 100% then it's definitely busy-waiting (because eventually it comes out).

    Start by looking at the Postgresql server-logs, and the Windows event log. Verify which version of Postgresql you are running and that it is the latest one. This particular DBMS is, afaik, a fairly-recent port to the Windows environment and there are many known problems running in NT (vs. Unix).
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

  8. #8
    Join Date
    Apr 2003
    Location
    Tunisia
    Posts
    192

    Smile Need to argue

    You can't benchmark Postgresql from a simple query, Mysql certaily beats the record, have you ever tested some big queries, we have a comlpagny based on postgresql it works fast, the same data operated in Mysql (if trigger and so exits) would like to be very very slow !
    Open up
    Take a look to my Blog http://www.rundom.com/karim2k

  9. #9
    Join Date
    Mar 2004
    Posts
    110
    I have a test db on WinXP, Postgresql 7.5, Apache 1.3 and php 5.01.

    Hardware:
    P2.67
    1 GB DDR
    120 GB SATA HD.

    I have a table with 4800 rows in it and it retrieves those a php page.

    When i use PG admin to see 'how fast' its retrieved on the db.. its around 453ms or so.

    Looks like something on your system is horribly wrong.

    I once had postgresql become very very slow, but that was because i was screwing around with loggings.... took me bloody 10 secs to run a simple query. But then again.. that was my own fault!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •