Mysql 4.1 vs 5.0

2009-06-02 Thread Jaime Fuentes
Benching
Somebody knows why 4.1 is faster than 5.0 mysql versions

Ing. Jaime Fuentes R.
997500459
2421905-2423252

Enviado desde mi  BlackBerry de Claro.

-Original Message-
From: Brent Baisley brentt...@gmail.com

Date: Tue, 2 Jun 2009 12:32:39 
To: Rayr...@stilltech.net
Cc: mysql@lists.mysql.com
Subject: Re: Question about query - can this be done?


On Tue, Jun 2, 2009 at 11:52 AM, Ray r...@stilltech.net wrote:
 Hello,

 I've tried the manual and google, but I am not even sure what to call what I
 want to do.

 simplified data example:
 I have a table of start and end times for an event, and an id for that event
 in a table. each event may occur multiple times, but never more than 5 times
 and rarely more than 3.
 I want a query that will provide one record per event with all times included.
 feel free to answer RTFM or STFW as long as you provide the manual section or
 key words.  ;)
 Thanks,
 Ray


 chart form follows:

 id | event_id | start | end
 ---
 1  |    4         | t1    | t2
 2  |    4         | t3    | t4
 3  |    4         | t5    | t6
 4  |    5         | t1    | t2
 5  |    5         | t3    | t4

 becomes

 id | event_id | start | end | start | end | start | end
 ---
 ?  |     4        | t1    | t2     | t3    | t4    |  t5    | t6
 ?  |     5        | t1    | t2     | t3    | t4


I think what you are looking for is GROUP_CONCAT. You can just GROUP
BY event id, and then process the resulting delimited string on the
front end.
SELECT event_id, GROUP_CONCAT(start) start_dates, GROUP_CONCAT(end) end_dates
FROM events GROUP BY event_id

Or even combined start and end dates into a single string and group them.
SELECT event_id, GROUP_CONCAT( CONCAT(start, '-', end) ) start_end
FROM events GROUP BY event_id

But, if you really want to get it in the column format you indicate,
you can make a much more complicated query. Use SUBSTRING_INDEX to
split out the parts of the group you need.

SELECT event_id,
SUBSTRING_INDEX(GROUP_CONCAT(start), ',', 1 ) start1,
SUBSTRING_INDEX(GROUP_CONCAT(end), ',', 1 ) end1,
SUBSTRING_INDEX( SUBSTRING_INDEX(GROUP_CONCAT(start), ',', 2 ), ',',
-1 ) start2,
SUBSTRING_INDEX( SUBSTRING_INDEX(GROUP_CONCAT(end), ',', 2 ), ',', -1 ) end2,
SUBSTRING_INDEX( SUBSTRING_INDEX(GROUP_CONCAT(start), ',', 3 ), ',',
-1 ) start3,
SUBSTRING_INDEX( SUBSTRING_INDEX(GROUP_CONCAT(end), ',', 3 ), ',', -1 ) end3,
SUBSTRING_INDEX( SUBSTRING_INDEX(GROUP_CONCAT(start), ',', 4 ), ',',
-1 ) start4,
SUBSTRING_INDEX( SUBSTRING_INDEX(GROUP_CONCAT(end), ',', 4 ), ',', -1 ) end4,
SUBSTRING_INDEX( SUBSTRING_INDEX(GROUP_CONCAT(start), ',', 5 ), ',',
-1 ) start5,
SUBSTRING_INDEX( SUBSTRING_INDEX(GROUP_CONCAT(end), ',', 5 ), ',', -1 ) end5
FROM events GROUP BY event_id;

I think that will give the format you specified, but I am not
recommending you do it this way.

Hope that helps.

Brent Baisley

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=jfuen...@segursat.com



Re: too many connections

2008-09-19 Thread Jaime Fuentes
You have to use mysql 64bits on S.O. 64bits 

--Mensaje original--
De: Martin Gainty
Para: Kinney, Gail
Para: 'mysql@lists.mysql.com'
Enviado: 19 Sep 2008 10:51
Asunto: RE: too many connections


in my.cnf configuration file try upping the number of connections
max_connections=3072
to
max_connections=6144

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 From: [EMAIL PROTECTED]
 To: mysql@lists.mysql.com
 Date: Fri, 19 Sep 2008 09:33:58 -0600
 Subject: too many connections
 
 Hello,  We have MySQL 4.0.14 and have just gotten an error:  too many 
 connections.  we can't connect to our site using MySQL admin.  Please help.
 
 Gail Kinney
 Webmaster UC Denver
 [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]
 

_
Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008


Enviado desde mi  BlackBerry de Claro.

mysql x64en server 64 bits

2008-07-03 Thread Jaime Fuentes

Hi every body:
I've a Server with Intel quad Core processor + Wndows 2003 server R2 64 
bits, I'm trying to install a myql 5.1 x64 but it shows me that
this installation package is npot supported by this processor type. 
Contact your vendor.


What could be happening ?

please help me Urgent.

Jaime Fuentes R.
Peru



Arpotu escribió:

All,

I have a customer who has been on MySQL for about 8 years, but they are
moving their business elsewhere.  They are moving their database into an
Oracle shop, and want me to export their MySQL data into a format that's
easily imported into Oracle.  Does anyone have experience doing this, or
are there migration tools?

A flatfile export has been suggested, but I'm not sure if they'll need to
maintain data types in the export.

Ideas?

Thanks,
Arpotu.


  


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: procedure locks all statemens

2008-03-28 Thread Jaime Fuentes

Hi

Last days frequently I see  an error message :
Can't create a new thread  (errno 12) if you are not out of available 
memory, you can consult the manual for a possible OS-dependent bug.

mysql is 5.0.41
server RAm: 2Gb and 100 Gb free spaces hard disk
users around 64 
Into my.ini the max_connection parameter is 2048.


what could be happened? and what to solve this ?

Jaime Fuentes R.




HELP: mysql stoped sudenly , Database page corruption on disk or a failed

2007-02-28 Thread Jaime Fuentes

Dear Friends:

since 2 weeks ago the mysql is stoping sudenly, and into the error log 
is as lines below,  Database page corruption on disk or a failed , 
file read of page 34,

how I can know what table is in page 34 ?
I've used mysqlcheck, without any result, all is OK for it,

mysql 4.01 is running on windows 2003 and the ibdata1of  innodb is 20 GB

Thanks in advance

Jaime


070228 17:44:04  InnoDB: Page checksum 75769562, prior-to-4.0.14-form 
checksum 3189442283

InnoDB: stored checksum 4088203197, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 0 36808, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 34,
InnoDB: space id (if created with = MySQL-4.1.1 and stored already) 0
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 34.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
070228 17:45:07  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
070228 17:45:07  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 29 4030208738.
InnoDB: Doing recovery: scanned up to log sequence number 29 4030343563
070228 17:45:07  InnoDB: Starting an apply batch of log records to the 
database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 
89 90 91 92 93 94 95 96 97 98 99

InnoDB: Apply batch completed
070228 17:45:09  InnoDB: Flushing modified pages from the buffer pool...
070228 17:45:09  InnoDB: Started; log sequence number 29 4030343563