Jump to content

fenway

Staff Alumni
  • Posts

    16,168
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by fenway

  1. You have to escape the quotes -- mysql_real_escape_string() comes to mind.
  2. That's a php issue... mysql doesn't know what you want to do.
  3. What was wrong with Barand's idea... except use a user variable as row counter, and check MOD 5 of that?
  4. Which table is vendor_id in?
  5. It's not really a good idea, as max_packet_size can be an issue... use the FS for what it was meant for.
  6. What doesn't work about it?
  7. You'll need to use STR_TO_DATE if they're not really dates.
  8. The # of different user names isn't really going to make much of a difference...
  9. What if you drop the order by clause?
  10. I feel like I've answered this question before... partitioning is a very advanced concept, and not really necessary.
  11. There are always performance issues... do you have a specific qurestion?
  12. fenway

    Dates

    That should be: DATE_FORMAT(from_unixtime(topic_time),'%m %d %Y')
  13. Then how are we supposed to help?
  14. English-only, please....
  15. I tried to re-write your query: SELECT DISTINCT ic_data.bucket FROM ic_data INNER JOIN ic_index_buckets ON (ic_index_buckets.sid=ic_data.bucket AND ic_index_buckets.csv=ic_data.csv ) INNER JOIN ic_index_bucketgroups ON ( ..... ) WHERE ( ic_data.csv BETWEEN 3 AND 4 OR ic_data.csv BETWEEN 8 AND 17 OR ic_data.csv BETWEEN 20 AND 21 ) AND value ( = ????? ) GROUP BY ic_data.bucket ORDER BY SUM( ic_data.value ) DESC I'm confused by a few things: 1) Why is ic_index_bucketgroups used? How is it related to the other tables? 2) you're not checking "value" for anything in the where clause? 3) Why GROUP BY / ORDER BY if you're using DISTINCT with a single column! 4) There are many missing indexes.
  16. Have you confirmed that the DB value is actually the same before/after? Is the php version the same?
  17. Can we see the actual query that caused that error?
  18. Mysql 5.1 has partioning for this very reason.
  19. Not that I know of... why would you want to?
  20. Yeah, but they're leaving federated in/out of certain production builds, so you have to be careful.
  21. Yes, you should definitely use another table for multiple countries... but I would also split the username/password from the address info.
  22. I assume you got those from the sticky -- what currently doesn't "work" about it?
  23. fenway

    Group by month

    You can do it, but anything other than the group-by'ed column will be meaningless!
  24. Strictly speaking, you need the join condition -- it's an accident if it works.
  25. Not without MySQL 5.
×
×
  • 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.