On 12-07-16 06:57 PM, Rick James wrote:
Plan A:
Would the anti-UNION problem be solved by hiding the UNION in a subquery? The
outer query would simply return what the UNION found.
Of course! Yes, problem solved.
Plan B:
Insert every row twice into expression_expression -- (e1,e2) and also
PM
> To: mysql@lists.mysql.com
> Subject: Re: alternative to slow query
>
> On 12-07-03 02:18 PM, Stillman, Benjamin wrote:
> > Not sure why it wouldn't show primary as a possible key then...
>
> Yes, that seems rather strange.
>
>
> > From your
On 12-07-03 02:18 PM, Stillman, Benjamin wrote:
Not sure why it wouldn't show primary as a possible key then...
Yes, that seems rather strange.
From your first email:
*** 1. row ***
id: 1
select_type: SIMPLE
table:
age-
From: brian [mailto:mysql-l...@logi.ca]
Sent: Tuesday, July 03, 2012 1:47 PM
To: mysql@lists.mysql.com
Subject: Re: alternative to slow query
On 12-07-03 01:13 PM, Stillman, Benjamin wrote:
> I don't see an index for expression.id.
>
mysql db_lexi > s
On 12-07-03 01:13 PM, Stillman, Benjamin wrote:
I don't see an index for expression.id.
mysql db_lexi > show index from expression\G
*** 1. row ***
Table: expression
Non_unique: 0
Key_name: PRIMARY
Seq_in_index: 1
Column_name: id
I don't see an index for expression.id.
-Original Message-
From: brian [mailto:mysql-l...@logi.ca]
Sent: Tuesday, July 03, 2012 12:28 PM
To: mysql@lists.mysql.com
Subject: Re: alternative to slow query
On 12-07-02 09:33 PM, yoku ts wrote:
> Hello,
>
> add index to expr
On 12-07-02 09:33 PM, yoku ts wrote:
Hello,
add index to expression1_id and expression2_id on expression_expression.
it doesn't use index,following,
WHERE
ee2.expression1_id = $ID
OR
ee1.expression2_id = $ID
Thank you for your reply. The table already has indexes on thes
Hello,
add index to expression1_id and expression2_id on expression_expression.
it doesn't use index,following,
> WHERE
> ee2.expression1_id = $ID
> OR
> ee1.expression2_id = $ID
regards,
2012/7/3 brian
> I have a table that joins on itself through a second table:
>
> table