Hi Moritz,
Thus, my questions:
- what's wrong with that query? I know they are big tables, but
according to EXPLAIN, this should be fast enough, because mysql's seeing
the indexes just fine.
As others have said, likely nothing wrong with the query per se. It
just sounds like you're hitting
olumns can be referenced via UNIQUE indexes
OR using a concatened index on item_id and type_id
will go a long way to speed up the query
Viel Gluck/
Martin
- Original Message -
From: "Moritz von Schweinitz" <[EMAIL PROTECTED]>
To:
Sent: Friday, November 09, 2007 1:16 PM
Subj
ing a concatened index on item_id and type_id
will go a long way to speed up the query
Viel Gluck/
Martin
- Original Message -
From: "Moritz von Schweinitz" <[EMAIL PROTECTED]>
To:
Sent: Friday, November 09, 2007 1:16 PM
Subject: mysql eluding query debugging?
Ok, i don&
In the last episode (Nov 09), Moritz von Schweinitz said:
> Ok, i don't get it.
>
> I have the following query:
> SELECT
> SUM(quant)
> FROM
> movement_items
> LEFT OUTER JOIN movements ON movements.id = movement_items.movement_id
> WHERE
> item_id = 21311
> AND
> movements.type_id = 1
>
> where
Ok, i don't get it.
I have the following query:
SELECT
SUM(quant)
FROM
movement_items
LEFT OUTER JOIN movements ON movements.id = movement_items.movement_id
WHERE
item_id = 21311
AND
movements.type_id = 1
where 'movement_items' has about 1.3M rows, and 'movements' about 0.5M rows.
EXPLAIN gives
"Colt Brunton" <[EMAIL PROTECTED]> wrote:
> I am trying to adapt a query, (kindly) given by Rudy and I can't seem to
> debug it.
>
> Here is the query:
> CREATE TABLE Contact
>(SELECT
>ContactNo,
>W
Sorry Rudy
Still no luck Can't seem to figure out what's wrong.
CREATE TABLE Contact
SELECT
ContactNo,
Work_Address,
Field20,
Sorry, MySQL does not like the ( ). Try it without them :)
Cheers
/rudy
-Original Message-
From: Colt Brunton [mailto:[EMAIL PROTECTED]
Sent: vrijdag 18 juli 2003 15:38
To: [EMAIL PROTECTED]
Subject: Query debugging
Hi all
I am trying to adapt a query, (kindly) given by Rudy and I
Hi all
I am trying to adapt a query, (kindly) given by Rudy and I can't seem to
debug it.
Here is the query:
CREATE TABLE Contact
(SELECT
ContactNo,
Work_Address,