On 10 Jun 2002, at 17:10, Elsad YUSIFLI wrote:
> WHERE (a.HOST_NAME regexp rtrim(b.ip)+'%')
What are you trying to accomplish there? '%' is not a special
character in regular expressions. Are you mixing up REGEXP and LIKE?
Even if that's what it is, I'd expect a column called ip to be a
com
Try using LIKE instead of regexp and create index on HOST_NAME if not
present.
Nilesh
-Original Message-
From: Chris Knipe [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 1:24 PM
To: Elsad YUSIFLI; [EMAIL PROTECTED]
Subject: Re: 45 seconds
I have multiple tables on a 166MMX
7582
- Original Message -
From: "Elsad YUSIFLI" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 10, 2002 4:10 PM
Subject: 45 seconds
>
> i have a table and 51000 records in it.
> it has got an index on HOST_NAME field.
> next query lasts
which MySQL will then be able to use indexes to
join on.
Harrison
Elsad YUSIFLI wrote:
>i have a table and 51000 records in it.
>it has got an index on HOST_NAME field.
>next query lasts 45 seconds to execute...
>is it normal ? server is PIII 500 double cpu
>
>SELECT b.ip as ip,
Check that your fields are indexed.
This usually fixes it.
George
- Original Message -
From: "Elsad YUSIFLI" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 10, 2002 3:10 PM
Subject: 45 seconds
>
> i have a table and 51000 records in
i have a table and 51000 records in it.
it has got an index on HOST_NAME field.
next query lasts 45 seconds to execute...
is it normal ? server is PIII 500 double cpu
SELECT b.ip as ip, b.country , b.hostname , a.HOST_NAME as host, COUNT(a.HOST_NAME)
as number
FROM new_raw_log as a, dns as b