[EMAIL PROTECTED] wrote:
> Ok, I will be the first to say that I am learning about indexes, however
> it is my understanding that if I have a database with MANY rows and I
> wish my queries to be faster I should index my database. With that being
> said, I have 2 tables in my database that are be
have received this message in error please
notify the sender immediately and delete the message.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 8:41 AM
To: Christopher L. Hood
Cc: [EMAIL PROTECTED]
Subject: Re: Indexed Database still slow
In the last episode (Jul 28), [EMAIL PROTECTED] said:
> I think the UNION is the right way to handle this, in fact, I would be
> tempted to break it into 6 UNIONS... more on that later.
I think his 2 original unions should suffice. Unions are great for
overcoming mysql's "one index per table" lim
Brent,
I humbly disagree with your analysis. I believe that it is well
established in this list and other places
(http://dev.mysql.com/doc/mysql/en/EXPLAIN.html) that the query engine
only uses at most 1 index of the available indexes on any table involved
in the query. It has also been shown
I think the UNION is the right way to handle this, in fact, I would be
tempted to break it into 6 UNIONS... more on that later.
You really should concentrate mostly on coverage for fields used in your
WHERE clauses, in this case: Framed_IP_Address and Date. Additional fields
can be used to get
Your problem is that you created a single index. An index is just a
presorted list of the data. The first column in the index is the most
relevant, being sorted by that column first. If you have an index on
State+County+Town, how would you quickly find a town? You can't if you
don't know the S
Ok, I will be the first to say that I am learning about indexes, however
it is my understanding that if I have a database with MANY rows and I
wish my queries to be faster I should index my database. With that being
said, I have 2 tables in my database that are being queried with a
single query usi