* DeRyl
* Roger Baklund
The first thing to notice: Using temporary... this is to be avoided, if
possible.
## how is the correct way to avoid that?
Depends, in this case I think it is because of the DISTINCT.
The first table read is klientslowo based on the criteria
klientslowo.klientslowo
PROTECTED]
cc
Subject
Re: great problem with questions
it works much worse like before
I've changed bigint(14) to bigint(12)
next I reindexed all
I've changed key_bueer_size to 128M
then I restarted mySQL
when I try to execute that:
select
logo,
klient.klientid,
klientnazwa,
struktura
hello,
I have database with 30 tables [some have over 2000k some other over 4000k rec]
when I want to run a sql with a few conditions the answer is dramatically slow
[over 70 seconds!]
sql-s with one condition usually works well..
how is the corrcet way to optimize the database and sql
* DeRyl
I have database with 30 tables [some have over 2000k some other
over 4000k rec]
when I want to run a sql with a few conditions the answer is
dramatically slow
[over 70 seconds!]
sql-s with one condition usually works well..
how is the corrcet way to optimize the database and sql
This is probably due to having indexed only single columns. MySQL uses only
one index per column, meaning if you have a where with two conditions you
need a combined index for the columns used. If there are only indeces for the
single columns, only one index for one condition will be used, the
`klientid` (`klientid`)
) TYPE=MyISAM;
---
Darek
- Original Message -
From: Roger Baklund [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: DeRyl [EMAIL PROTECTED]
Sent: Thursday, September 23, 2004 1:19 PM
Subject: Re: great problem with questions
* DeRyl
I have database with 30 tables [some
Am Thursday 23 September 2004 13:22 schrieb Stefan Kuhn:
This is probably due to having indexed only single columns. MySQL uses only
one index per column, meaning if you have a where with two conditions you
Sorry, this should read one index per table...
need a combined index for the columns
* DeRyl
explain example sql question gives:
[...]
The first thing to notice: Using temporary... this is to be avoided, if
possible.
The first table read is klientslowo based on the criteria
klientslowo.klientslowo LIKE 'sam%'. Is this a reasonable approach to
solving the query, giving your
The first thing to notice: Using temporary... this is to be avoided, if
possible.
## how is the correct way to avoid that?
The first table read is klientslowo based on the criteria
klientslowo.klientslowo LIKE 'sam%'. Is this a reasonable approach to
solving the query, giving your knowledge of
The fact that you are joining 10 tables together in one query may be a
major portion of your performance problem. Even if the *average* size of
each table is only 10 rows, the MySQL engine will have to pour over
10x10x10x10x10x10x10x10x10x10 = 10 to the 10th power = 1e10 =
10,000,000,000 (10
DeRyl [EMAIL PROTECTED] wrote on 09/23/2004 09:51:45 AM:
The fact that you are joining 10 tables together in one query may be a
major portion of your performance problem. Even if the *average* size of
each table is only 10 rows, the MySQL engine will have to pour over
11 matches
Mail list logo