Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. Or actually escape your input data properly.
  2. Then use a derived table for the second method.
  3. That's too bad. Learn to like it. The worst will happen, forever. Don't do it.
  4. Many alternatives... the sticky has some good resources.
  5. I don't follow... why not join the tables?
  6. That's php's fault.
  7. fenway

    Slow GROUP BY

    What you actually want is an index on ( ld_id, ld_keyword )... we can sort of the order by after.
  8. CHAR columns for every single one of the above, or leading zeros will kill you.
  9. Show both result sets.
  10. Don't muck around with user data, unless there are strict and tangible formatting requirements.
  11. Please stop posting screenshots for syntax errors -- this is your first & last warning. Also, RTFM -- you need commas between your columns.
  12. OR you could (a) ask for more money or (b) not do the work for no money.
  13. fenway

    Slow GROUP BY

    Why don't you have any indexes???
  14. I can't wade through code. Get the raw SQL query, run EXPLAIN on it, and post your results here.
  15. Two things. 1) You can have a primary key across multiple columns. 2) Don't EVER re-use ActionID -- terrible idea -- you'll thank me later.
  16. That sounds wrong... 1s to query a table with const & PRIMARY on small record sets?
  17. Well, 5.1 has index_merge, so you can sometimes get around the "one index per table" issue. Also: That's not actually true -- the optimizer will handle this quite easily. The order only matter when there are not equality constraints; in that case, the constant needs to go first. That is: WHERE column1 = ? AND column2 >= ? will use the index BUT WHERE column1 >= ? AND column2 = ? won't.
  18. Please don't.
  19. Well, you'd have to do the wedate grouping in code.
  20. If you "found" code, then ask whomever "wrote" it. FYI, you can choose to do either.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.