Call a routine on mysqld startup

2009-06-15 Thread Gabriel Linder
Hi, I must call a routine when mysqld start (to populate a heap table). I did not find any related options in mysqld --help --verbose. Is there a way to achieve this, without modifying the startup script ? Thanks in advance. -- MySQL General Mailing List For list archives:

Fastest way to select on 0/1 flag

2009-06-15 Thread Artem Kuchin
Hello! I cannot figure out the fastest way to do a select on the floowing field: f_spectinyint not null; It is a table of 100 000 records of products and f_spec is set only for about 200 products. I figure it could be done in two ways: 1) create an index on f_spec and do simple select

Re: Fastest way to select on 0/1 flag

2009-06-15 Thread Darryle Steplight
Hi Artem, There can be many malicious factors at play here, but if you are not using an index then definitely create on now. It will obviously help you with option 1 and you can still benefit from it with option 2. If you don't have an index, MySQL has to search for you data row by row which

Re: query question...

2009-06-15 Thread Martijn Engler
It sounds to me like you want to join the two tables? http://dev.mysql.com/doc/refman/5.1/en/join.html On Mon, Jun 15, 2009 at 03:56, brucebedoug...@earthlink.net wrote: hi. i've got a situation, where i'm trying to figure out how to select an item from tblA that may/maynot be in tblB. if

Re: query question...

2009-06-15 Thread Shawn Green
Hi Bruce, bruce wrote: hi. i've got a situation, where i'm trying to figure out how to select an item from tblA that may/maynot be in tblB. if the item is only in tblA, i can easilty get a list of the items select * from tblA if the item is in tblA but not linked to tblB, i can get the

Re: Call a routine on mysqld startup

2009-06-15 Thread Jim Lyons
There's an option called init-file that will invoke an sql script on start up. That would probably work for you. On Mon, Jun 15, 2009 at 5:17 AM, Gabriel Linder lin...@jeuxvideo.comwrote: Hi, I must call a routine when mysqld start (to populate a heap table). I did not find any related

Re: Call a routine on mysqld startup

2009-06-15 Thread Gabriel Linder
On Mon, 15 Jun 2009 10:00:00 -0400 Jim Lyons jlyons4...@gmail.com wrote: There's an option called init-file that will invoke an sql script on start up. That would probably work for you. Thanks you, that is what I was searching for. I guess I should clean my glasses :) -- MySQL General

The size of an index (INDEX_LENGTH)

2009-06-15 Thread Morten
Hi, I dropped an index on a table with 25M records today. The INDEX_LENGTH in information_schema.tables shrank from 3834642432 to 3215982592, ie. ~618Mb difference The index was on an int(11) column. That means each index key takes up ~618Mb/25M ~= 25 bytes but that doesn't sound

Re: The size of an index (INDEX_LENGTH)

2009-06-15 Thread Dan Nelson
In the last episode (Jun 15), Morten said: I dropped an index on a table with 25M records today. The INDEX_LENGTH in information_schema.tables shrank from 3834642432 to 3215982592, ie. ~618Mb difference The index was on an int(11) column. That means each index key takes up ~618Mb/25M

Innodb Update_time

2009-06-15 Thread Darvin Denmian
Hello List, how can i get table update_time using innodb engine? Thanks. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

restoring mysql db doesn't restore user passwords

2009-06-15 Thread Adam Williams
I'm running Fedora 11 i386 with Mysql 5.1.32. I dumped my mysql databases with: mysqldump -u root -pxxx --lock-all-tables --all-databases /root/mysql-backup/all-db.sql and then wiped the operating system and reinstalled. Then I ran mysqladmin -u root password to set my root

RE: restoring mysql db doesn't restore user passwords

2009-06-15 Thread Little, Timothy
My theory would be that it's an OLD-PASSWORDS issue. It would seem that you might have used the old_passwords=1 in your original configuration my.cnf but it's not in your new configuration file. -Original Message- From: Adam Williams [mailto:awill...@mdah.state.ms.us] Sent: Monday,

Re: restoring mysql db doesn't restore user passwords

2009-06-15 Thread Adam Williams
you're a genius! I had old_passwords=1 in my.cnf, changed it to 0, restarted mysql, and then the users worked like a charm. thanks! Little, Timothy wrote: My theory would be that it's an OLD-PASSWORDS issue. It would seem that you might have used the old_passwords=1 in your original

RE: The size of an index (INDEX_LENGTH)

2009-06-15 Thread Andrew Braithwaite
Hi, Is your table MyISAM or InnoDB? Andrew -Original Message- From: Morten [mailto:my.li...@mac.com] Sent: 15 June 2009 21:23 To: mysql@lists.mysql.com Subject: The size of an index (INDEX_LENGTH) Hi, I dropped an index on a table with 25M records today. The INDEX_LENGTH in