ANN: Hopper (stored procedure debugger), version 1.0.1 released

2012-06-20 Thread Martijn Tonies
/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

Need Query Help

2012-06-20 Thread Anupam Karmarkar
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           

Indexing about 40 Billion Entries

2012-06-20 Thread Christian Koetteritzsch
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,

Re: Indexing about 40 Billion Entries

2012-06-20 Thread Ananda Kumar
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,

RE: Need Query Help

2012-06-20 Thread Rick James
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,

RE: Indexing about 40 Billion Entries

2012-06-20 Thread Rick James
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

Re: Indexing about 40 Billion Entries

2012-06-20 Thread Christian Koetteritzsch
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

Re: Indexing about 40 Billion Entries

2012-06-20 Thread Christian Koetteritzsch
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

Re: Indexing about 40 Billion Entries

2012-06-20 Thread Shawn Green
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`;

RE: Indexing about 40 Billion Entries

2012-06-20 Thread Rick James
(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

RE: Indexing about 40 Billion Entries

2012-06-20 Thread Rick James
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,