Order by in derived table slow

Discussion in 'Databases' started by sc_king, Jan 27, 2010.

  1. #1
    Hi guys,

    I'm not sure what's going on with the order by.

    The order by name below takes .14 seconds. Without it, it takes .0054 seconds.

    An order by name without the join takes .00036 seconds
    The join without the order by name takes .005 seconds

    Why does it take .14 combined, what am i missing?

    Thanks
     
    sc_king, Jan 27, 2010 IP
  2. sc_king

    sc_king Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Anybody have any ideas on this issue?
     
    sc_king, Jan 28, 2010 IP
  3. koko5

    koko5 Active Member

    Messages:
    394
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    70
    #3
    Hi sc_king

    Do you have Index on stars.name?
    Creating this Index can speed up the query, but no more than
    Regards,
    Nick
     
    koko5, Jan 28, 2010 IP
  4. sc_king

    sc_king Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hey Koko,

    Thanks for the reply.

    It takes the same amount of time on all the fields.

    Even if I order by id and that's the primary key.

    Thanks
     
    sc_king, Jan 28, 2010 IP