Table advice.

2009-08-01 Thread Paul Halliday
I have a database that I am (will) be using to track URL's. The table structure looks like this: CREATE TABLE event ( eid INT UNSIGNED NOT NULL AUTO_INCREMENT, timestamp INT(10) UNSIGNED NOT NULL DEFAULT 0, ipINT(10) UNSIGNED NOT NULL DEFAULT 0, fqdn

Re: Table advice.

2009-08-01 Thread Alexander Kolesen
Hello. Your query performs a full table scan, because if you match text with '%...' wildcard, MySQL can't using index. Try to use external full-text search engines like Sphinx (http://www.sphinxsearch.com/) or Lucene (http://lucene.apache.org). I have a database that I am (will) be using to

Re: logging slow queries with time

2009-08-01 Thread Milan Andric
Thanks for the quick replies guys. I won't be pulling queries our of Drupal anytime soon. The optimizations I will do are minimal. Sounds like we might just have to live with mediocre performance for now. I will definitely looks further at maatkit though. I actually ran it mk-query-digest on