Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Unanswered: MyODBC Terrible performance

    Hi!
    I'm trying to run a query with MyODBC but is getting terrible performance compared to MySQLcc.

    The query i'm trying to run is
    "(SELECT
    Priority, OnDateExt, CONCAT(OnTime, '.', OnMilli), OffDateExt, OffTime, Name, Native_SumDesc, Comment
    FROM history.alarm_summary
    WHERE OnDateExt > DATE_SUB(CURDATE(), INTERVAL 14 DAY) )
    UNION
    (SELECT
    Priority, OnDateExt, CONCAT(OnTime, '.', OnMilli), OffDateExt, OffTime, Name, Native_SumDesc, Comment
    FROM history.event_summary
    WHERE OnDateExt > DATE_SUB(CURDATE(), INTERVAL 14 DAY) )

    ORDER BY 2 DESC, 3 DESC
    LIMIT 0,38 "

    I've tried to optimize the query by removing calculations but this doesn't seems to help at all.

    If i run this query with MySQLcc it reports that the query ran at 0.09Sek.

    Running the exactly same query from excel "New database query" takes about 12Sek!!!.

    I've checked all drivers for debug versions but only release versions is installed.

    The client is a w2k with the latest MyODBC.
    The server is also running w2k with MySQL 4.0.13.

    The server has high cpu usage during the query.

    Anybody has any idea of what could cause this?

    Fredrik

  2. #2
    Join Date
    Sep 2003
    Posts
    69
    Unions can be pretty heavy duty on a query afaik

Posting Permissions

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