Re: Database procedures

2010-12-14 Thread Machiel Richards
HI All

Just to give you some idea of what I have tried thus far:

   

mysql delimiter //
mysql create procedure select_delete_id (in dt date, out id bigint)
begin select max(id) into id from archive_collections where utc  dt;
end//
Query OK, 0 rows affected (0.00 sec)

mysql delimiter ;
mysql call select_delete_id(2010-12-13 00:00,@delete_id);
Query OK, 0 rows affected (0.00 sec)

mysql select @delete_id;
++
| @delete_id |
++
|   NULL |
++
1 row in set (0.00 sec)



The delete_id should however return the value 3823054 and not null.

Regards
Machiel





-Original Message-
From: Machiel Richards machi...@rdc.co.za
To: mysql mailing list mysql@lists.mysql.com
Subject: Database procedures
Date: Tue, 14 Dec 2010 08:37:10 +0200

HI All

I am hoping that someone with more experience than me can assist
here.

I am trying to find out how to write a database procedure within
MySQL, however I have never worked with procedures in my life and the
resources I found on the net thus far seems greek to me...


What we are trying to achieve is the following:

There are currently 2 specific tables which contains
archived data which are being deleted manually each day.

  We would like to put the delete of the data within
a procedure and then have an automated process to execute the procedure.


What we are using currently is the following:

1.  = select max(id) from table_1
where utc  Date;
2. delete from table_2 where id  ;
3. delete from table_1 where id  ;

basically we currently delete everything
older than the start of yesterday but this might be changin at some
point to be done hourly as the system grows.


Does anybody have a good resource which explains
exactly how I would be able to create this procedure or can otherwise
assist or guide me?

I would really appreciate the help as I would
love to learn how to write procedures.

Regards
Machiel


Re: MySQL Parallel Inserts

2010-12-14 Thread Krishna Chandra Prajapati
Hi Andy,

I agree, prefer LOAD DATA INFILE... command for bulk loading. It is 30%
faster than normal inserts.

Krishna

On Tue, Dec 14, 2010 at 8:02 AM, Andy listan...@gmail.com wrote:

 Greetings everyone.

 I am in a situation where I need to do parallel inserts into MySQL database
 from inside my Perl program. Basically, I have several million records to
 insert into the database, and hence I would rather do them in parallel than
 doing them one at a time. I looked around but did not find any information
 on doing this. Does MySQL not support parallel reads/writes?

 Thanks in advance.

 Andy



List archive?

2010-12-14 Thread Patrice Olivier-Wilson
I have a question that this list solved a year ago, and I can't remember 
what the solution was. Does this list have an archive?


(Sorry if it is on one of the links to the list, but I don't have any on 
hand at the moment.)

--
Patrice Olivier-Wilson
http://biz-comm.com

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



Re: List archive?

2010-12-14 Thread Patrice Olivier-Wilson

On 12/14/10 12:51 PM, Patrice Olivier-Wilson wrote:

I have a question that this list solved a year ago, and I can't remember
what the solution was. Does this list have an archive?

(Sorry if it is on one of the links to the list, but I don't have any on
hand at the moment.)


see  it on the bottom of my post... thanks and sorry for noise

--
Patrice Olivier-Wilson
http://biz-comm.com

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



Re: List archive?

2010-12-14 Thread Daniel P. Brown
On Tue, Dec 14, 2010 at 12:52, Patrice Olivier-Wilson b...@biz-comm.com wrote:
 On 12/14/10 12:51 PM, Patrice Olivier-Wilson wrote:

 I have a question that this list solved a year ago, and I can't remember
 what the solution was. Does this list have an archive?

 (Sorry if it is on one of the links to the list, but I don't have any on
 hand at the moment.)

 see  it on the bottom of my post... thanks and sorry for noise

It's also archived in many other places, such as GMANE[1] and MARC[2].


^1: http://gmane.org/
^2: http://marc.info/

-- 
/Daniel P. Brown
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



How can i subscribe

2010-12-14 Thread omar zorgui
Hello,

How can i subscribe for this list


Re: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

2010-12-14 Thread Yves Goergen
On 13.12.2010 15:26 CE(S)T, who.cat wrote:
 try  /mysql_bin_path/mysql_secure_installation !
 Hope it helpfu!

I already followed that path and it doesn't quite help. I've done the
checks that the install script does and my installation is secure by
those means. But I don't want to install things. The server is already
up and running in production. I only want to get rid of that whole load
of messages posted to syslog. I don't know where they come from to do
further analysis.

-- 
Yves Goergen LonelyPixel nospam.l...@unclassified.de
Visit my web laboratory at http://beta.unclassified.de

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



Re: How can i subscribe

2010-12-14 Thread Daniel P. Brown
On Tue, Dec 14, 2010 at 13:58, omar zorgui omarzor...@gmail.com wrote:
 Hello,

 How can i subscribe for this list

http://lists.mysql.com/mysql?sub=1


-- 
/Daniel P. Brown
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Negative connection/thread IDs in mysqld.log?

2010-12-14 Thread Atle Veka
Hi, I tried searching for an answer to this to no avail. I noticed my 
mysqld.log contains negative connection/thread IDs. mysqld itself shows 
positive IDs as expected. Some sort of wrap?


/usr/sbin/mysqld, Version: 5.0.32. started with:
Tcp port: 3306  Unix socket: /tmp/mysql.sock
Time Id CommandArgument
101212  8:00:01 -2049127301 Connect ...


Regards,
Atle

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



Mysql 5.5.x -- when is it going to go GA?

2010-12-14 Thread Hank
Mysql 5.5 -- when is it going to go GA?

And when it does, which version will it be?  5.5.8 or 5.5.6rc?

Thanks,

-Hank


Bulk Insertion Performance

2010-12-14 Thread Feris Thia
Hi All,

I have a data warehouse infrastructure with following configuration :
- MySQL 5.0 MyISAM + InndoDB enabled (XAMPP Distribution)
- Windows 2003 64 bit data center edition
- Java Runtime 6 - 32 bit version

And have ETL running data warehouse process. Reading is impressive, 12,000
rows per second. But writing with only 10 columns (integer and varchar
combinations) takes 3,000 rows / second.

Is there a way to configure writing to have a better performance ?

Thanks,

Feris


Re: Bulk Insertion Performance

2010-12-14 Thread Mark Matthews

On Dec 14, 2010, at 6:51 PM, Feris Thia wrote:

 Hi All,
 
 I have a data warehouse infrastructure with following configuration :
 - MySQL 5.0 MyISAM + InndoDB enabled (XAMPP Distribution)
 - Windows 2003 64 bit data center edition
 - Java Runtime 6 - 32 bit version
 
 And have ETL running data warehouse process. Reading is impressive, 12,000
 rows per second. But writing with only 10 columns (integer and varchar
 combinations) takes 3,000 rows / second.
 
 Is there a way to configure writing to have a better performance ?

Feris,

*How* are you writing, via batch statements with rewriting, or directly, or via 
LOAD DATA INFILE? It seems you're off by about a factor of 10-20x from what 
I've seen performance-wise for writes.

-Mark
-- 
Mark Matthews
Principal Software Developer -  MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html








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



Re: Bulk Insertion Performance

2010-12-14 Thread Feris Thia
Hi Mark,

On Wed, Dec 15, 2010 at 8:10 AM, Mark Matthews mark.matth...@oracle.comwrote:

 Feris,

 *How* are you writing, via batch statements with rewriting, or directly, or
 via LOAD DATA INFILE? It seems you're off by about a factor of 10-20x from
 what I've seen performance-wise for writes.


I'm using ETL mean - for this case, it is a java application name Kettle
(Pentaho Data Integration). And it use JDBC connection.

Is it a JDBC driver configuration ?


-Mark
 --


Thanks,

Feris


Re: Mysql 5.5.x -- when is it going to go GA?

2010-12-14 Thread Sharl.Jimh.Tsin
not sure,maybe help to you:
http://forge.mysql.com/wiki/Development_Cycle#GA_releases

Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)



2010/12/15 Hank hes...@gmail.com:
 Mysql 5.5 -- when is it going to go GA?

 And when it does, which version will it be?  5.5.8 or 5.5.6rc?

 Thanks,

 -Hank


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