the query first in mysql and then in the JDBC
client and I get the same so it is not caching. I've done a bit of
searching but found nothing - any ideas ?
Chris
On 7/22/05, Chris Faulkner [EMAIL PROTECTED] wrote:
That was exactly the problem. Thanks. MySQL can't use two indexes
:
That was exactly the problem. Thanks. MySQL can't use two indexes on
the same table at the same time. Thanks for the other suggestions but
I'll use this workaround.
Chris
On 7/22/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I believe the conflict here is the OR. Try this...
select * from table
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
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
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.
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
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
ORred together.
If you rephrase your query
SELECT * from table
WHERE field2
but it is on their list of to-do`s, this will be
a cool feature. The UNION 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 6:04 AM
To: Chris Faulkner
Cc: mysql
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
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 optimizer looks at the available 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:
I
Hi!
I have a little pb with indexes.
when I make an explain on my query I have strange results.
my query looks like this
select *
from LIST l, WIN c
where l.ID_LIST=c.ID_LIST and l.KEY = '421' and l.ACTIF='1';
table LIST :
ID_LIST(primary key), KEY, ACTIF, ...
table WIN
ID_WIN(primary key),
* 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 NOT
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 fast.
for that client or all clients for the timespan
represented by the timestamp condition (24 hours). It can not use multiple
indexes in the same statement (except for when using joins).
The combined index would be able to select the wanted records directly, and
it may also be used for any other query using
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)
PJM == Patrick J Militzer [EMAIL PROTECTED] writes:
PJM I'm using mysql 3.22.27. How can I force mysql to use index's in
PJM my select statement?
You don't. SQL is a 4GL and you only describe what you want, and it
is up to the language interpreter and optimizer to do it efficiently.
--
Hi,
On Tue, Apr 24, 2001 at 10:44:59AM -0400, Vivek Khera wrote:
PJM == Patrick J Militzer [EMAIL PROTECTED] writes:
PJM I'm using mysql 3.22.27. How can I force mysql to use index's in
PJM my select statement?
You don't. SQL is a 4GL and you only describe what you want, and it
is up
Hi there,
I'm using mysql 3.22.27. How can I force mysql to use index's in my select
statement?
When I use explain to see what the optimiser is doing I see that its using the
wrong index. When I try to use the USE INDEX(KEY1,KEY) i get a syntax error.
Any ideas
Thanks,
Pat
Pat Militzer
19 matches
Mail list logo