Re: There is a ram limit?

2010-09-22 Thread Johan De Meersman
On Thu, Sep 23, 2010 at 12:39 AM, Camilo Uribe wrote: > On Fri, Jul 9, 2010 at 12:03 AM, Johan De Meersman > wrote: > > This will mostly depend on your OS, really. Assuming you're running a > 64-bit > > flavour of *nix on that box, I don't think you have to worry. > > Linux on 64-bits. > Yes, bu

Re: document for mysql performance improvement

2010-09-22 Thread Vokern
2010/9/23 Johnny Withers > > Can you show us the output of: show status like '%innodb%' > JW > Sure. mysql> show status like '%innodb%'; +---++ | Variable_name | Value | +---+---

Re: Swap data in columns

2010-09-22 Thread Kevin (Gmail)
update mydata set column1 = column2, column2 = column1 (works in sqlserver, can't try mysql at the moment) You can select which rows by adding a where clause obviously. I suppose that the field values are copied to a buffer which is the written to the table at the end of the update (or row by row

Re: There is a ram limit?

2010-09-22 Thread Camilo Uribe
On Fri, Jul 9, 2010 at 12:03 AM, Johan De Meersman wrote: > This will mostly depend on your OS, really. Assuming you're running a 64-bit > flavour of *nix on that box, I don't think you have to worry. Linux on 64-bits. The default installation will use all the ram it needs or do I have to config

RE: Swap data in columns

2010-09-22 Thread Rolando Edwards
Oh yea, INNER JOIN is cleaner to use Rolando A. Edwards MySQL DBA (CMDBA) 155 Avenue of the Americas, Fifth Floor New York, NY 10013 212-625-5307 (Work) 201-660-3221 (Cell) AIM & Skype : RolandoLogicWorx redwa...@logicworks.net http://www.linkedin.com/in/rolandoedwards -Original Message

Re: Swap data in columns

2010-09-22 Thread Johnny Withers
This is even better! JW On Wed, Sep 22, 2010 at 2:27 PM, Steve Staples wrote: > What about: > select `id`, `column1` as 'column2', `column2` as 'column1'; > > Steve > > > > On Wed, 2010-09-22 at 13:06 -0500, Johnny Withers wrote: > > Couldn't you just rename the columns? > > > > JW > > > > > >

Re: Swap data in columns

2010-09-22 Thread Egor Shevtsov
Hi Rolando, This is perfect solution I was looking for. Why do you use left join here? It looks like inner join works fine as well. Thanks. Rolando Edwards wrote: I ran these commands: use test DROP TABLE IF EXISTS mydata; CREATE TABLE mydata (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,column1

Re: Swap data in columns

2010-09-22 Thread nixofortune
Hi Rolando, This is perfect solution I was looking for. Why do you use left join here? It looks like inner join works fine as well. Thanks. > > > > > > Rolando Edwards wrote: > > I ran these commands: > > use test > DROP TABLE IF EXISTS mydata; > CREATE TABLE mydata (id INT NOT NULL AUTO_INCREME

Re: Swap data in columns

2010-09-22 Thread Steve Staples
What about: select `id`, `column1` as 'column2', `column2` as 'column1'; Steve On Wed, 2010-09-22 at 13:06 -0500, Johnny Withers wrote: > Couldn't you just rename the columns? > > JW > > > On Wed, Sep 22, 2010 at 11:53 AM, Rolando Edwards > wrote: > > > I ran these commands: > > > > use tes

Re: Swap data in columns

2010-09-22 Thread Johnny Withers
Couldn't you just rename the columns? JW On Wed, Sep 22, 2010 at 11:53 AM, Rolando Edwards wrote: > I ran these commands: > > use test > DROP TABLE IF EXISTS mydata; > CREATE TABLE mydata (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,column1 > CHAR(1),column2 CHAR(2)); > INSERT INTO mydata (colum

RE: Swap data in columns

2010-09-22 Thread Rolando Edwards
I ran these commands: use test DROP TABLE IF EXISTS mydata; CREATE TABLE mydata (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,column1 CHAR(1),column2 CHAR(2)); INSERT INTO mydata (column1,column2) VALUES ('a','z'), ('b','y'), ('c','x'), ('d','w'), ('e','v'); SELECT * FROM mydata; UPDATE mydata A L

Re: document for mysql performance improvement

2010-09-22 Thread Johnny Withers
Can you show us the output of: show status like '%innodb%' JW On Tue, Sep 21, 2010 at 10:11 PM, vokern wrote: > And this is the innodb file size, does this matter for performance? > > $ du -h ibdata* > 11G ibdata1 > 11G ibdata2 > 11G ibdata3 > 59G ibdata4 > > > > 2010/9/22 voke

Swap data in columns

2010-09-22 Thread nixofortune
Hi all. Sorry for very simple question, just can't figure out the solution. I need to swap data in column1 with data in column2. ++-+-+ | id | column1 | column2 | ++-+-+ | 1 | a | z | | 2 | b | y | | 3 | c | x | | 4

Re: document for mysql performance improvement

2010-09-22 Thread Baron Schwartz
Hi, > If its an IO problem the first and easiest thing to do is (probably) look at > your disk subsystem. You can easily achieve higher disk IO by increasing the > number of disks and implementing something like RAID1+0. Or you can be logical about it and try to determine whether the IO performan