NION will allow you to use both composite
>> > indexes at the same time because it is two queries.
>> >
>> > Ed
>> >
>> > -Original Message-
>> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> > Sent: Friday, July 22, 2005
gt; > Ed
> >
> > -----Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Friday, July 22, 2005 6:04 AM
> > To: Chris Faulkner
> > Cc: mysql@lists.mysql.com
> > Subject: Re: use of indexes
> >
> > The system c
22, 2005 6:04 AM
To: Chris Faulkner
Cc: mysql@lists.mysql.com
Subject: Re: use of indexes
The system cannot used the index on field2 because it is the second half
of the index in both cases, and it can only use indexes in order. It
cannot use the separate indexes on field 1 and field 2 because the are
erms separately? If the field2 hit is is pretty selective, it does
not really matter what the others do.
Alec
Chris Faulkner <[EMAIL PROTECTED]>
22/07/2005 12:46
Please respond to
Chris Faulkner <[EMAIL PROTECTED]>
To
mysql@lists.mysql.com
cc
Subject
Re: use of inde
Hi
field2 is indexed. I have 2 indexes. One is on field1 and field2, the
second indexes field3 and field2.
You mean a separate index which only indexes field2 ? Ithought that
the type of query I am doing is a good reason for doing composite
indexes.
Chris
On 7/22/05, Eugene Kosov <[EMAIL PROT
Eugene Kosov wrote:
Chris Faulkner wrote:
HI
I have a query like this
select * from table where (
( field1 = 'VALUE1' and field2 like 'VALUE2%' ) OR ( field3 = 'VALUE1'
and field2 like 'VALUE2%' ) )
I have created two composite indexes - one on field1 + field2 and one
on field3 + field2. Ex
Chris Faulkner wrote:
HI
I have a query like this
select * from table where (
( field1 = 'VALUE1' and field2 like 'VALUE2%' )
OR
( field3 = 'VALUE1' and field2 like 'VALUE2%' )
)
I have created two composite indexes - one on field1 + field2 and one
on field3 + field2. Explain on the SQL
HI
I have a query like this
select * from table where (
( field1 = 'VALUE1' and field2 like 'VALUE2%' )
OR
( field3 = 'VALUE1' and field2 like 'VALUE2%' )
)
I have created two composite indexes - one on field1 + field2 and one
on field3 + field2. Explain on the SQL indicates that the indexes
-2287
M: (713) 252-4688
-Original Message-
From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]
Sent: Monday, April 26, 2004 4:23 PM
To: Boyd E. Hemphill
Cc: [EMAIL PROTECTED]
Subject: Re: Optimization and the use of indexes
On Mon, Apr 26, 2004 at 05:17:45PM -0500, Boyd E. Hemphill wrote:
>
but that's best thought of as
multiple queries anyway.
> Are there any more details regarding the use of indexes I can find
> in the documentation? Specifically how the optimizer picks which
> index to use? I read through 7.2.4 and several other sections but
> no luck.
The
I thought I heard at the conference that the optimizer only uses a one
index per table in a query regardless of the number of indexes on the
table.
Is this true? Are there any more details regarding the use of indexes I
can find in the documentation? Specifically how the optimizer picks
which
* Sebastian Bergmann
> Roger Baklund wrote:
> > You can almost always improve the performance of queries by adding an
> > index. The trick is to add the right index... :) If you for instance
> > often did a "SELECT * FROM pot_accesslog WHERE client_id=$id AND
> > timestamp > NOW() - INTERVAL 24 HO
Roger Baklund wrote:
> However, if the behaviour with no restrictions on duplicates is
> correct, you may be better of without a primary key in this case.
Okay, that's what I need here.
> Also, the second create statement defines indexes on all fields, making
> almost any query reasonably fas
* Sebastian Bergmann
> I am currently trying to optimize the indexes / keys for the MySQL
> schema of phpOpenTracker.
I don't know phpOpenTracker, but I have a few comments.
> I'm wondering if multiple keys, like
>
> CREATE TABLE pot_accesslog (
> accesslog_id int(10) unsigned NO
I am currently trying to optimize the indexes / keys for the MySQL
schema of phpOpenTracker.
I'm wondering if multiple keys, like
CREATE TABLE pot_accesslog (
accesslog_id int(10) unsigned NOT NULL,
client_idint(10) unsigned NOT NULL,
document_id int(11)
15 matches
Mail list logo