Hi everyone,
I have a couple of questions invovling using FOUND_ROWS() and UNION.
The manual states that:
The value of FOUND_ROWS() is exact only if UNION ALL is used. If
UNION without ALL
is used, duplicate removal occurs and the value of FOUND_ROWS() is
only approximate.
I am using UNION
the mark - sorry!
What if you remove the straight_join specification and let MySQL's JOIN
optimizer do its own thing?
Dan
Taras D wrote:
Sorry everyone, forgot to put in my setup detail!
SQL version: 5.0.22-community-nt
Windows 2000 Professional 5.0, SP 4
Dan, I tried your suggestion
Hi everyone,
Should be an easy question, but I couldn't find the answer anywhere.
Firstly, I can't figure out why the REF column shows NULL, and secondly I
don't know why the key length is 5.
I have the following db:
table l
(
aId int unsigned not null auto_increment primary key,
sId
!)
I wonder if you'd have better success with the version you're on if you
re-wrote your query more like so:
select straight_join *
from l,d
where (l.sId = d.dId)
and (d.sId in (1, 2));
Dan
Taras D wrote:
Hi everyone,
I have the following schema:
create table l
(
aId int unsigned not null
Hi everyone,
I have the following schema:
create table l
(
aId int unsigned not null auto_increment primary key,
sId smallint unsigned not null,
dId smallint unsigned,
index(sId,dId)
);
create table d
(
sId smallint unsigned not null,
dId smallint unsigned not null,
primary key(sId,