going on for my personal knowledge. Any insights
would be great. Thanks.
Les Fletcher
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Thanks for the link. That helps a lot.
Rob Wultsch wrote:
On Fri, Mar 14, 2008 at 12:04 PM, Les Fletcher <[EMAIL PROTECTED]> wrote:
| Field | Type| Null | Key | Default | Extra |
| intfield1 | smallint(6) | YES | | 0| |
| intfield2 | smallint(6)
I am having some issues with some integer fields and string input. The
table setup is the following:
| Field | Type| Null | Key | Default | Extra |
| intfield1 | smallint(6) | YES | | 0| |
| intfield2 | smallint(6) | YES | | NULL| |
| intfield3 | smal
Are specifying the joins more optimal than using a multiple from and a
where clause when doing an inner join?
SELECT tbl1.*,tb2.* FROM tbl1, tbl2 WHERE tbl1.col1=tbl2.col2;
vs.
SELECT tbl1.*,tb2.* FROM tbl1 JOIN tbl2 ON tbl1.col1=tbl2.col2;
vs.
SELECT tbl1.*,tb2.* FROM tbl2 JOIN tbl1 ON tbl1
If I am not mistaken, group by only uses an index if the index is first
used as part of the where clause and is compared to a constant. You'd
need a two column index for this query:
INDEX(active,food)
The 'active' part would be used in the where clause, and the second part
( "food" ) could t
SQL_CALC_FOUND_ROWS isn't an option for us. Right now I am doing two
queries, but I am just trying to see if there is a better way to do the
count query than to just turn it into a dervied table and count the
results i.e. SELECT COUNT(*) FROM (big nasty query) t1.
I think what the question is
I have a nice little query that I can get the results from fine, but am
having problems figuring out the best way to get the count directly from
mysql. The query looks like the following:
SELECT t1.id, t1.col1, t2.id, t2.col1, t2.col2, t2.col3, t2.col4 FROM t1
JOIN t2 ON ( t2.id = t1.col1 ) W
I have two questions about the overhead associated with updating the
indexes when records are added, deleted or modified. Lets say I have a
table of 1 million records that is partitioned on partitionedfield (10
distinct values).
id int
partitionedfield int
property1 int
property2 int
property