Yea do a search on the mysql.com web site for date functions (or just
click here http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html )
its loaded with many examples and descriptions of useful functions.
Built in date calculations are one thing I really enjoy with mysql.
Best,
Yoed
I have a table with 22,371,273 rows, current type is MyISAM. I have one
query tha took nearly 5 hours to complete. I do not know if this like
it should be or not, but I thought I'd ask the list. My gut feeling is
the `gropu by` that's slowing it down but nonetheless 5 hours seems
excessive.
Ive posted thsi query twice and got no reply - Im sure somebody must know
thw answer!!!
whast the field length limitations for insertion of a WKT string into a
geometry column?
Maybe it's because
1) not many people use spatial data in MySQL
2) the question is rather theoretical
yours,
insert into new_table
select month_day, floor(bucket/3) as bucket, date, src, avg(value) as
value
from source_table
group by month_day, bucket, src;
Relevant `explain` details:
Full table scan: 22,371,273 rows, Using temporary; Using filesort
Query OK, 11495208 rows affected (4 hours 47
Interesting comment.
I find by experiment that
(select * from FOO order by a desc limit 10) order by a;
removes duplicates, but, if I drop the second order clause,
(select * from FOO order by a desc limit 10);
duplicates are retained.
Why is the first a union, but not the second? Just
I find by experiment that
(select * from FOO order by a desc limit 10) order by a;
removes duplicates, but, if I drop the second order clause,
(select * from FOO order by a desc limit 10);
duplicates are retained.
Why is the first a union, but not the second? Just curious.
On
As Jeremy says - it depends totally on what you want to do.
If you have tables where there is no logical, unique way to identify that
column (or the only way to do so is via a column you do not want to use for
this purpose), then assigning a separate ID column as a PK makes sense.
E.g: If you
On 23 Apr 2004, at 9:48 pm, [EMAIL PROTECTED] wrote:
Relevant `explain` details:
Full table scan: 22,371,273 rows, Using temporary; Using filesort
The filesort is a giveaway. Can you increase the sort buffer size so
that the sort can happen in memory rather than having to use a file to
sort?
As I stated before, my guess that duplicates are removed is because the
SELECT is handled like
one part of a UNION (I'll have a look at the code later to check if this
is the case). Really,
a UNION should consist of two or more SELECTs, so this is not the
expected behaviour. The way this REALLY
Use insert delayed, and you will cut your time in half. At least with my
experience. But also how long does it actually take to run the query
itself. Giving a summary explain doesn't help much. You really need a
table structure that the select is using and a full explain.
Donny
Hi,
Is there any recommended MySQL Auditing guideline available somewhere on
the Net? (Anything other then the recommededation mention in the
official documentation). If there's any IT Auditor out there who would
like to share his/her work?
Thanks.
Hassan
--
MySQL General Mailing List
For
Hello,
I'm trying to create some summary data using some existing InnoDB tables
and I'm running into performance issues. Here is the query:
select topicx, count(*) from BillVote t1 left join BillVotestudentRelation
t3 on t1.mvcoid=t3.idstudent_p left join Student t2 on
From: Anders Karlsson [EMAIL PROTECTED]
And by the way, in a UNION, there is no need to put parenteses around
the unioned queries in the general case. So
(SELECT .) UNION (SELECT) [ORDER BY ]
Is the same as
SELECT . UNION SELECT [ORDER BY ]
I say in the general case,
On Fri, 23 Apr 2004, Steven Palm wrote:
Well, using gcc-3.3_branch and UnixWare 7.1.0, I tried the dev release
4.1.1-alpha off the mysql site to see if I would have better luck
You need the latest bk
http://dev.mysql.com/doc/mysql/en/Installing_source_tree.html
You can run bk under
I must have done a poor job at explaining this. I already have all
those primary keys, etc. If you are required to do a full table scan on
the table, as I am in my example, please explain to me how an index even
matters in that case. There is _no_ where clause in the query so how
will an
hi,
I want to know if there is a way to change the display of the mysql
query results.
itz confusing to see if you have a lot of fields in the table. and if the
string is a long string for a particular string there are lot of lines that
are being printed.
Liz
--
MySQL General
* [EMAIL PROTECTED] [EMAIL PROTECTED] [2004-04-24 19:40 +0200]:
I want to know if there is a way to change the display of the mysql
query results.
If you're under GNU/Linux, type \P less -S at the mysql prompt.
This sets the pager to less, which allows you to use the four cursor
keys for
Hello,
I have seen lots of these same errors but no real solutions. Hopefully you
can help me out
I am trying to upgrade an existing Mysql install from mysql-3.23.58-1.9 to
the latest mysql-4
When I try to run the upgrade RPM I get
rpm -Uv MySQL-server-4.0.18-0.i386.rpm
warning:
http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html
Do not use DELAYED with INSERT ... SELECT.
With respect to the table structure...can you explain how when you have
to read every single row regardless how the structure (assuming you are
going down the path of idexes) affects the query?
Cliff, still no explain still not table structure. Until that happens enjoy
the 5 hour club.
Donny
-Original Message-
From: Cliff Daniel [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 24, 2004 6:41 PM
To: Donny Simonton
Cc: 'Tim Cutts'; [EMAIL PROTECTED]
Subject: Re: SLOW
20 matches
Mail list logo