/displaynews.php?item=20120620
With regards,
Martijn Tonies
Upscene Productions
http://www.upscene.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql
Hi All,
I need query help for following table struture, where we need to calculate
login duration of that employee for give period.
Example table
EmployeeID LoginTime LogoutTIme
101 2012-05-01 10:00:00 2012-05-01 12:30:00
102
Hi guys,
As the title says I'm trying to index 40 billion entries with two
indexes on a server with 16 cores and 128GB RAM. The table is the one
below and it is a myisam table. The *.myd file is about 640GB
DROP TABLE IF EXISTS `l4_link`;
CREATE TABLE `l4_link` (
`ruid1` int NOT NULL,
looks like the value that you give for myisam_max_sort_size is not enough
for the index creation and hence it doing a REPAIR WITH KEYCACHE
Use the below query to set the min values required for myisam_max_sort_size
to avoid repair with keycache
select
a.index_name as index_name,
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_timediff
and SEC_TO_TIME()/3600
-Original Message-
From: Anupam Karmarkar [mailto:sb_akarmar...@yahoo.com]
Sent: Wednesday, June 20, 2012 2:39 AM
To: mysql@lists.mysql.com
Subject: Need Query Help
Hi All,
Even if you get past the REPAIR WITH KEYCACHE, the ALTER will still take
days, maybe weeks.
I strongly recommend you do not try to access that many rows directly.
Instead, build summary tables, and access them. We can discuss further.
Unfortunately, you did not even include a PRIMARY KEY
Thanks for the information. It is no problem if it takes days or weeks,
because the server is specially for such tasks that takes time and uses
lots of resources.
Am 20.06.2012 19:55, schrieb Rick James:
Even if you get past the REPAIR WITH KEYCACHE, the ALTER will still take
days, maybe
sorry I forget the ORDER BY in the SELECT statement so the correct
SELECT statement is:
SELECT ruid1, ruid2, overlap FROM l4_link WHERE ruid1=xxx OR ruid2=xxx
ORDER BY overlap DESC
Am 20.06.2012 22:42, schrieb Christian Koetteritzsch:
Thanks for the information. It is no problem if it takes
On 6/20/2012 5:45 AM, Christian Koetteritzsch wrote:
Hi guys,
As the title says I'm trying to index 40 billion entries with two
indexes on a server with 16 cores and 128GB RAM. The table is the one
below and it is a myisam table. The *.myd file is about 640GB
DROP TABLE IF EXISTS `l4_link`;
(ruid1, ruid2) will help for AND, but not at all for OR.
-Original Message-
From: Shawn Green [mailto:shawn.l.gr...@oracle.com]
Sent: Wednesday, June 20, 2012 2:30 PM
To: mysql@lists.mysql.com
Subject: Re: Indexing about 40 Billion Entries
On 6/20/2012 5:45 AM, Christian
SELECT ruid1, ruid2, overlap FROM l4_link WHERE ruid1=xxx OR ruid2=xxx ORDER
BY overlap DESC
MySQL does not optimize that kind of OR well. This will run _much_ faster
(with your two indexes):
(
SELECT ruid1, ruid2, overlap FROM l4_link WHERE ruid1=xxx
UNION
SELECT ruid1, ruid2,
11 matches
Mail list logo