1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Slow query execution with strange issue

Discussion in 'MySQL' started by xena, Aug 26, 2008.

  1. #1
    Hi there,

    Right now I am fazing one issue which is getting hell out of me. I am explaining the issues step by step.

    1. I have one site running from last 3 years with large database and there is one main table which has maximum load.
    2. Now, I have redesigned the site with lots of changes within this table too.
    3. The problem is that the server is same, queries are same but output in the new database is taking 50 times more execution time.
    4. I also just copy paste the table, and fire the same query... Strange even that is not working...

    Is it something where newly added table or database is having issues in the server??

    I have tried all, compared the structures of the data and table but still the query result is too slow on live testing sever. While same query in main site of same server is running perfectly.

    Have any one fazed such and issue? Please help me out of the situation as site is ready but I m not able to put new version live.

    Thanks in advance. Any details are greatly appreciated.

    Xena
     
    xena, Aug 26, 2008 IP
  2. falcondriver

    falcondriver Well-Known Member

    Messages:
    963
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    145
    #2
    cant say anything without knowing the database structure, the query or the number of data in all affected rows.
     
    falcondriver, Aug 26, 2008 IP
  3. cont911

    cont911 Peon

    Messages:
    50
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    May guess this problem is not related to old big and new databases
    This is just problem with new DB.
    Just check some basic things like indexes.
     
    cont911, Aug 26, 2008 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    Hello Xena,

    Welcome to the forum.

    Compare the EXPLAIN results of both queries and tell us what the difference you find.
     
    mwasif, Aug 26, 2008 IP
  5. xena

    xena Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi,

    The table has around 60,000 rows.

    Have tried all.. .optimize, check, repair table... all the stuff...

    just helpless with all tries.... same table.. same structure when copied as new name, query stop working fast..

    Indexing.. and other stuff are also been checked and they are fine.

    Pls help as normally no one sees such issues.. even i have nt till now..
     
    xena, Aug 26, 2008 IP
  6. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #6
    Can you post the results of EXPLAIN on both the queries?
     
    mwasif, Aug 27, 2008 IP
  7. cont911

    cont911 Peon

    Messages:
    50
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    xena, are you using mysql?
    I have faced similar issue on pgsql if vacuum was not run for long time
     
    cont911, Aug 27, 2008 IP
  8. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #8
    This is an important question :)
     
    mwasif, Aug 28, 2008 IP