How to get Error Number and Error Message 2nd Try

2009-02-10 Thread Al
I know that all of the prgramming interfaces have the ability to issue a Function Call to get "error number for the most recently invoked MySQL function" and "the error message for the most recently invoked MySQL function" such as in C using " *mysql_errno()" etc. BUT * Surely there is

MySQL Magazine -- Winter 2009 issue released

2009-02-10 Thread Keith Murphy
Hey everyone, This is one of the largest issues so far. In addition, it has some of the best content we have ever had. The articles are all in-depth with some exciting new information: * *Introduction to XtraDB*: an overview of the new XtraDB storage engine along with benchmarks and

Re: mysql optimization tips

2009-02-10 Thread Baron Schwartz
> You can read a few pages from High Performance MySQL 1st edition at > http://books.google.ca/books?id=sgMvu2uZXlsC&printsec=frontcover&dq=mysql+high+performance#PPP1,M1 > Google Books also has excerpts from other MySQL books. You can also get the Query Optimization chapter online as a PDF from h

Re: mysql optimization tips

2009-02-10 Thread mos
At 06:44 PM 2/10/2009, Michael Dykman wrote: On Tue, Feb 10, 2009 at 7:23 PM, Baron Schwartz wrote: > Hi, > > On Tue, Feb 10, 2009 at 9:25 AM, monloi perez wrote: >> Hi All, >> >> I'm not sure if this question is fine, I'm new to the list and I just have one very important question. >> Can any

Re: mysql optimization tips

2009-02-10 Thread Michael Dykman
On Tue, Feb 10, 2009 at 7:23 PM, Baron Schwartz wrote: > Hi, > > On Tue, Feb 10, 2009 at 9:25 AM, monloi perez wrote: >> Hi All, >> >> I'm not sure if this question is fine, I'm new to the list and I just have >> one very important question. >> Can anyone help me suggest the right optimization f

Re: mysql optimization tips

2009-02-10 Thread Baron Schwartz
Hi, On Tue, Feb 10, 2009 at 9:25 AM, monloi perez wrote: > Hi All, > > I'm not sure if this question is fine, I'm new to the list and I just have > one very important question. > Can anyone help me suggest the right optimization for our company's server. I suggest High Performance MySQL, Second

Re: db setup - correction

2009-02-10 Thread PJ
ddevaudre...@intellicare.com wrote: > PJ wrote on 02/10/2009 12:44:04 PM: > > >> -- - >> -- Table `books` >> -- - >> CREATE TABLE IF NOT EXISTS `books` ( >> `id` SMALLINT(4) UNSIGNED NOT N

Re: Re: Re: MySQL 5.1.31 PostInstall Script Error

2009-02-10 Thread Claudio Nanni
My pleasure, Bunti! let me know if you need any help, I worked ten years on Sun Solaris, and six of these with a rambling MySQL on it, I always compiled my MySQL release, and enjoyed so much Solaris, it is the most stable operating system I ever worked with, very good choice! Cheers Claudio 2009

Re: Size limitation of user variable?

2009-02-10 Thread Baron Schwartz
On Tue, Feb 10, 2009 at 1:29 PM, Cantwell, Bryan wrote: > I am trying to put the result of a function that returns MEDIUMTEXT into > a user variable in my procedure. I haven't attempted to push the limits > of the MEDIUMTEXT size, but wonder if the user variable can even handle > this? The REPEA

Re: Re: Re: MySQL 5.1.31 PostInstall Script Error

2009-02-10 Thread bunti
Thanks Claudio, That helped. I had 32 bit one and was using 64 bit package. Thanks again for your help. Bunti. > The only thing I can tell you is you are using 64bit package instead of the > 32bit one. > Issue this /usr/bin/isainfo –kv > and see if you have 32 or 64 bit architecture os. > In cas

How to get Error Number and Error Message

2009-02-10 Thread Al
I know that all of the prgramming interfaces have the ability to issue a Function Call to get "error number for the most recently invoked MySQL function" and "the error message for the most recently invoked MySQL function" such as in C using " *mysql_errno()" etc. BUT * Surely there

RE: Query Help

2009-02-10 Thread Ben Wiechman
Awesome... that works. Had to add a where clause to limit it to a specific host. The explain for that looks... interesting. Thanks -Original Message- From: ddevaudre...@intellicare.com [mailto:ddevaudre...@intellicare.com] Sent: Tuesday, February 10, 2009 12:47 PM To: Ben Wiechman Cc:

Re: MySQL View

2009-02-10 Thread Jochem van Dieten
On Tue, Feb 10, 2009 at 1:47 PM, Steven Buehler wrote: > From: Jochem van Dieten: >> What the database will do for you behind the scenes is expand your >> usage of the view. In effect, the database will replace "x" with its >> definition. So your query SELECT a FROM x; gets expanded to: >> SELECT a

RE: Query Help

2009-02-10 Thread ddevaudreuil
"Ben Wiechman" wrote on 02/10/2009 01:30:14 PM: > Thanks for the input! That is close to what I need, however not exactly. It > will give me the last time a user logged into the host in question but I > want to prune users who have since logged into a different host. Basically > find out how man

RE: Query Help

2009-02-10 Thread Ben Wiechman
Alright to reply to myself I can return the information but have been unable to return the last row... instead it always returns the first row. Tried max, tried min, tried converting the datetime to a timestamp with the same results... mysql> SELECT da_userinfo.UserName, da_userinfo.Name, radacct

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
Martin, I'm guessing you mean 1 database per table type. On Tue, Feb 10, 2009 at 5:17 PM, Martin Gainty wrote: > > I vote for 1 table per TableType > this will keep your DB schema consistent with Architecture > > Martin > __ > Disclaimer and confidenti

RE: Query Help

2009-02-10 Thread Ben Wiechman
Thanks for the input! That is close to what I need, however not exactly. It will give me the last time a user logged into the host in question but I want to prune users who have since logged into a different host. Basically find out how many users are logged into a given host or who are not current

Size limitation of user variable?

2009-02-10 Thread Cantwell, Bryan
I am trying to put the result of a function that returns MEDIUMTEXT into a user variable in my procedure. I haven't attempted to push the limits of the MEDIUMTEXT size, but wonder if the user variable can even handle this? -- MySQL General Mailing List For list archives: http://lists.mysql.com/

Re: db setup - correction

2009-02-10 Thread ddevaudreuil
PJ wrote on 02/10/2009 12:44:04 PM: > -- - > -- Table `books` > -- - > CREATE TABLE IF NOT EXISTS `books` ( > `id` SMALLINT(4) UNSIGNED NOT NULL AUTO_INCREMENT , > `title` VARCHAR(148) NU

Re: db setup - correction

2009-02-10 Thread Peter Brawley
PJ PB>Engine choice is another issue. InnoDB properly isolates FK enforcement in the database. The MyISAM tradeoff (for speed) is that you have to implement FK logic in code. PJ>Forgive my naiveté, but how do you do that? You write application code to implement the equivalent of ON DELETE

Re: db setup - correction

2009-02-10 Thread PJ
Peter Brawley wrote: > PJ > > >But what about foreign keys? Don't I need that to find the relationships > >between the books, the authors and the categories? After all, isn't this > >a relational db? If so, I can't use the default engine (MyISAM) which > >does not support FK. So, if I have to use f

Query Help

2009-02-10 Thread Ben Wiechman
I keep hacking at this but haven't been able to get it right yet. I have two tables Userinfo contains a login, User's Name, Group Name Log contains login, host, datetime of last login What I need to do is return user information (userinfo.name/groupname) of users that have logged into

MySQL University session on Feb 12: Using DTrace with MySQL

2009-02-10 Thread Stefan Hinz
Using DTrace with MySQL http://forge.mysql.com/wiki/Using_DTrace_with_MySQL This Thursday (February 12th, 14:00 UTC), MC Brown will give a MySQL University session on Using DTrace with MySQL. MC has been involved not just with documenting DTrace but also with DTrace development; see his recent blo

RE: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Martin Gainty
I vote for 1 table per TableType this will keep your DB schema consistent with Architecture Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread mos
At 04:30 AM 2/10/2009, you wrote: Thanks for your comments Mike. The largest table contains 48 columns (objects), the second largest 20 columns (users) and all the rest are less than 10 columns. The instance sizes range from 10MB to 1GB. Transactions and row locking are required. Most queries a

Re: db setup - correction

2009-02-10 Thread Peter Brawley
PJ >But what about foreign keys? Don't I need that to find the relationships >between the books, the authors and the categories? After all, isn't this >a relational db? If so, I can't use the default engine (MyISAM) which >does not support FK. So, if I have to use foreign keys, I have to change >

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
I'll take that on board. Thanks for your advice, mysql-master-master, Maatkit, mysqlperformanceblog, your patches and community support! On Tue, Feb 10, 2009 at 3:54 PM, Baron Schwartz wrote: > Hi Michael, > > On Mon, Feb 9, 2009 at 6:03 PM, Michael Addyman > wrote: > > Dear Geniuses, > > > >

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Baron Schwartz
Hi Michael, On Mon, Feb 9, 2009 at 6:03 PM, Michael Addyman wrote: > Dear Geniuses, > > I have an application requiring ~30 InnoDB tables, which needs to scale up > to at least 500 application instances (500 instances * ~30 tables = 15,000 > tables). > > Discussions in the archives suggest I woul

Re: db setup - correction

2009-02-10 Thread PJ
Peter Brawley wrote: > PJ, > As I understand it, I have one table "books" it lists all the info for > the book other than the author(s) or the categories ; for these I need > an authors table and a category table... I'll continue with the authors > as categories will surely be the same thing. > > >

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
We'll continue to use many replication clusters of course. And yes, we use bonded gigabit ethernet. I stumbled across Dolphin Express today - if only there were a cheap alternative! Thanks for the reassurance! On Tue, Feb 10, 2009 at 2:21 PM, Johan De Meersman wrote: > > > On Tue, Feb 10, 2009

mysql optimization tips

2009-02-10 Thread monloi perez
Hi All, I'm not sure if this question is fine, I'm new to the list and I just have one very important question. Can anyone help me suggest the right optimization for our company's server. Our current server is a Dell PowerEdge 1900 a QuadCore with 1TB total (Raid 1) of HD space and 4G RAM. The

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Johan De Meersman
On Tue, Feb 10, 2009 at 2:57 PM, Michael Addyman < michael.addy...@googlemail.com> wrote: > Hooray! http://code.google.com/p/mysql-master-master/ > > Am I crazy to be considering replicating 500+ databases? I think so... > I don't think the number of databases is an issue - the main point is the

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
Hooray! http://code.google.com/p/mysql-master-master/ Am I crazy to be considering replicating 500+ databases? I think so... On Tue, Feb 10, 2009 at 12:11 PM, Michael Addyman < michael.addy...@googlemail.com> wrote: > Walter, this is exactly why we went for separate application instances > initi

Re: MySQL 5.1.30 MyISAM table corrupts when it hits 1GB

2009-02-10 Thread Andrew Carlson
Make sure you check you ulimit on file - I have hit that on AIX more than once. On Mon, Feb 9, 2009 at 2:42 PM, JD King wrote: > I am running MySQL 5.1.30 on AIX 5.3. When a table reaches 1GB the table > gets marked as corrupt. Is there a setting that limits table size to 1GB? > > > > -- > MySQL

RE: MySQL View

2009-02-10 Thread Steven Buehler
> -Original Message- > From: Jochem van Dieten [mailto:joch...@gmail.com] > Sent: Tuesday, February 10, 2009 5:10 AM > To: mysql@lists.mysql.com > Subject: Re: MySQL View > > On Mon, Feb 9, 2009 at 3:41 PM, Steven Buehler wrote: > > Ok, I just saw a post about using view's in mysql. I t

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
Johan, we considered this approach but concluded it would require too much re-development (more than just the database layer). Thanks anyway. On Tue, Feb 10, 2009 at 11:47 AM, Johan De Meersman wrote: > > > On Tue, Feb 10, 2009 at 12:39 PM, Michael Addyman < > michael.addy...@googlemail.com> wro

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
Walter, this is exactly why we went for separate application instances initially - it is the most flexible solution for scaling. However, we have since discovered that it's actually a lot more work to manage than we anticipated! We would love to continue using separate application instances (allo

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Walter Heck
I think it would be good to think about scaling a bit more. What if your requirements change from 500 application instances to 5000 instances? It is good to go with a solution now that can easily scale over to multiple servers. Also, it would probably be good if you could move databases over to oth

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Johan De Meersman
On Tue, Feb 10, 2009 at 12:39 PM, Michael Addyman < michael.addy...@googlemail.com> wrote: > > I have now thought of having 1 table type per database (i.e. ~30 > databases). > This would be easier and cheaper to manage than hundreds of databases, and > would also allow databases to be finely tuned

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
Thanks for your comments Mike. 1. The largest table has 48 columns, the second largest 20 columns, and the remainder less than 10 columns. 2. Each application instance (~30 tables) is between 50MB and 1GB. 3. Application instances are separate for many reasons including infrastructure/scaling fl

Re: MySQL View

2009-02-10 Thread Jochem van Dieten
On Mon, Feb 9, 2009 at 3:41 PM, Steven Buehler wrote: > Ok, I just saw a post about using view's in mysql. I tried to look it up > and found how to use it, but my question is: what is a view and why would > you use it? The problem with any definition of an object in a database is that there are m

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
Thanks for your comments Mike. The largest table contains 48 columns (objects), the second largest 20 columns (users) and all the rest are less than 10 columns. The instance sizes range from 10MB to 1GB. Transactions and row locking are required. Most queries are updates, followed by writes, then

Re: using Unix soft links

2009-02-10 Thread Johan De Meersman
On Mon, Feb 9, 2009 at 6:10 PM, Lucio Chiappetti wrote: > I used to make Unix soft links of mysql tables back on mysql 3.23. > > [...] > > But I wonder if there is anything intrinsically wrong in the usage of > soft-links, or whether this might be an indication instead of hardware > problems with

Re: InnoDB: Thousands of Tables or Hundreds of Databases?

2009-02-10 Thread Michael Addyman
Thanks for your comments Mike. The largest table contains 48 columns (objects), the second largest 20 columns (users) and all the rest are less than 10 columns. The instance sizes range from 10MB to 1GB. Transactions and row locking are required. Most queries are updates, followed by writes, then