Hello.
In my opinion - yes it is, however, trust only the benchmarks :)
Jason Pyeron <[EMAIL PROTECTED]> wrote:
>
> Am I correct in the statment second query is faster? This query gets
> executed several million times.
>
> mysql> explain select A.* from files as A where A.pathre
Am I correct in the statment second query is faster? This query gets
executed several million times.
mysql> explain select A.* from files as A where A.pathref=129286 and
version=(select max(version) from files as B where A.pathref=B.pathref);
+++---+--+
Hello.
>>> so why does 'explain select * from files where
>>> (pathref,version)=(129286,0);' scan the whole table?
It is documented that this syntax can't be optimized yet. See:
http://dev.mysql.com/doc/mysql/en/row-subqueries.html
Jason Pyeron <[EMAIL PROTECTED]> wrote:
> On Tu
On Tue, 6 Sep 2005, Dan Nelson wrote:
In the last episode (Sep 06), Jason Pyeron said:
there is an unique key index 'pathref_2 (pathref,version)' on this
table.
so why does 'explain select * from files where
(pathref,version)=(129286,0);' scan the whole table?
I have to admit I have never se
In the last episode (Sep 06), Jason Pyeron said:
> there is an unique key index 'pathref_2 (pathref,version)' on this
> table.
>
> so why does 'explain select * from files where
> (pathref,version)=(129286,0);' scan the whole table?
I have to admit I have never seen this syntax used in a where c
there is an unique key index 'pathref_2 (pathref,version)' on this table.
so why does 'explain select * from files where
(pathref,version)=(129286,0);' scan the whole table?
I can rewrite the query, but for reasons out of my control I have to
design a query which takes single value for a pat