Thanks Tom and Michael,
I got rid of all of the indexes except the one marked "PRIMARY" and a
new one that I made like this:
ALTER TABLE logs ADD unique (host,date,time,priority,facility,seq);
I see quite an improvement from what I was seeing before. The one
thing that I didn't realize is that
> >>Do I need to make a special index to index time on HOUR?
> Is it even
> >>possible?
> >
> > I believe the index on time will work for this.
>
> No, it won't. At least, not with the query as is:
>
>SELECT * FROM logs
>WHERE host IN ('10.20.254.5')
> AND date='2005-02-03'
>
Tom Crimmins wrote:
-Original Message-
From: Brad Guillory
Sent: Thursday, February 03, 2005 18:15
mysql> EXPLAIN SELECT * FROM logs WHERE host in
('10.20.254.5') and
date='2005-02-03' and HOUR(time) between '16' and '17'
ORDER BY seq DESC;
ALTER TABLE logs ADD unique (host,dat
> -Original Message-
> From: Brad Guillory
> Sent: Thursday, February 03, 2005 18:15
>
> Please be gentle, I have nearly no experience with SQL
> databases. I am
> not subscribed to the list so please cc me on replies.
>
> Because my email client probably did horrable things to this
Please be gentle, I have nearly no experience with SQL databases. I am
not subscribed to the list so please cc me on replies.
Because my email client probably did horrable things to this post you
can find the text here also:
http://nolab.org/scratch/mysql-index-oddness.html
I use syslog-ng t
Marc Slemko wrote:
On Thu, 26 Feb 2004, Keith Thompson wrote:
Given these two tables:
create table t1 (
id int unsigned auto_increment,
a int,
... [other fields]
primary key (id),
index aid (a,id)
) type=innodb;
create table t2 (
id int unsigned,
Given these two tables:
create table t1 (
id int unsigned auto_increment,
a int,
... [other fields]
primary key (id),
index aid (a,id)
) type=innodb;
create table t2 (
id int unsigned,
b int,
... [other fields]
index id (i
On Thu, 26 Feb 2004, Keith Thompson wrote:
> Given these two tables:
>
> create table t1 (
>id int unsigned auto_increment,
>a int,
>... [other fields]
>primary key (id),
>index aid (a,id)
> ) type=innodb;
>
> create table t2 (
>id int un
Lourdes,
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Friday, October 11, 2002 11:38 PM
Subject: InnoDB indexing questions
> Hello,
>
> I have some doubts about the index behaviour in InnoDB.
>
> I have a table n
Hello,
I have some doubts about the index behaviour in InnoDB.
I have a table named 'Albaranes'. The definition is as follow:
CREATE TABLE `albaranes` (
`Cli` varchar(6) NOT NULL default '',
`Alb` varchar(8) NOT NULL default '',
.
.
.
PRIMARY KEY (`Alb`),
UNIQUE KEY `Cliente` (`
Hello,
I have some doubts about the index behaviour in InnoDB.
I have a table named 'Albaranes'. The definition is as follow:
CREATE TABLE `albaranes` (
`Cli` varchar(6) NOT NULL default '',
`Alb` varchar(8) NOT NULL default '',
.
.
.
PRIMARY KEY (`Alb`),
UNIQUE KEY `Cliente` (`
11 matches
Mail list logo