Can I set many IP address with bind-address ? If not, how can do same thing ?

2006-10-03 Thread KLEIN Stéphane
Hi, Can I set many IP address with bind-address ? If not, how can do same thing ? In documentation, I read this : ''' -bind-address=IP The IP address to bind to. ''' They don't say if I can use comma to separate two or many IP. Thanks for your help, Stephane -- MySQL General Mailing List

Re: Can I set many IP address with bind-address ? If not, how can do same thing ?

2006-10-03 Thread Jacques Marneweck
KLEIN Stéphane wrote: Hi, Can I set many IP address with bind-address ? If not, how can do same thing ? In documentation, I read this : ''' -bind-address=IP The IP address to bind to. ''' They don't say if I can use comma to separate two or many IP. Thanks for your help, Stephane Hi

join vs subqueries

2006-10-03 Thread MAS!
I'm not (yet) using sub-queries since the old version of MySQL were unable to handle them, then I was using 'join'. I wish to know if it's possibile to do all what I did with 'join' with subqueries. and which one is faster/better to use? for example it'd be possibile to 'translate' that

Re: join vs subqueries

2006-10-03 Thread Martijn Tonies
I cannot help you on specific performance timings -- but if the result is the same, the database engine can use whatever trick to retrieve them. That being said, a subquery/derived table could then be rewritten (internally) to a JOIN, for example. Martijn Tonies Database Workbench - development

(Windows) drop / create index and lock tables

2006-10-03 Thread Rob Desbois
Hi all, Say I have the following MyISAM table (example-ified) in a Windows-hosted DB: CREATE TABLE foo ( column1 CHAR(1), column2 CHAR(1), UNIQUE KEY `keyX`(`column1`)); I have to perform an update of the key to extend it to both columns (it's an example, ignore the content of the key), and

Installing 32 and 64 bit versions on Solaris

2006-10-03 Thread Andrew Black - lists
I have some applications that need a 32 bit library for Mysql. I would prefer to install the 64 bit version of MySQL but that doesnt seem to come with 32 bit libraries. Can I install both libraries. Any pointers would be appreciated Andrew -- MySQL General Mailing List For list archives:

Returning value after insert

2006-10-03 Thread Deckard
Hi, Is there a way of after a select statement having a return value for a determined field ? For example, after this: INSERT INTO wl_users(name, email, password) VALUES('Deckard', '[EMAIL PROTECTED]', 'blabla') having the name returning without having to make a subsequent select. Any help

Re: (Windows) drop / create index and lock tables

2006-10-03 Thread Dan Buettner
Rob, seems like you want to ensure that no writes occur in between the drop index and create index statements, yes? It's not pretty, but you could stop the mysql service and start it back up with --skip-networking, then access it from localhost to perform your changes. If you have processes

FreeBSD 6.1 + Libthr + MySQL 5.0.24a max connection issue or bug?

2006-10-03 Thread Abdullah Ibn Hamad Al-Marri
Hello folks, I hope Greg is reading this list I use MySQL 5.0.24a from the FreeBSD ports, with libthr threading. I have a huge app makes alot of connections to MySQL server. The max I could reach is 1500 threads, even I made the max connection in my.cf 5k and I used

RE: Innodb Locks

2006-10-03 Thread Robert DiFalco
Any thoughts on this? Should SomeTable be locked when performing the UPDATE on AnotherTable? --- Is there a detailed source for when innodb creates row or table locks? I have a situation where one thread is performing this in one transaction: UPDATE SomeTable SET WHERE

RE: Innodb Locks

2006-10-03 Thread Rick James
Can't answer your question directly. But I wonder if this would trick it into avoiding the lock: UPDATE AnotherTable SET... WHERE id IN (SELECT id FROM SomeTable); And the real workaround would be CREATE TEMPORARY TABLE t SELECT id ...; UPDATE AnotherTable SET... WHERE id IN

Question

2006-10-03 Thread Feliks Shvartsburd
Does anybody know how can I see what queries are currently being executed? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Question

2006-10-03 Thread Chris Comparini
On Tuesday 03 October 2006 10:57, Feliks Shvartsburd wrote: Does anybody know how can I see what queries are currently being executed? From the mysql commandline, use show processlist; There is also a program called mytop which shows what's executing. -Chris -- MySQL General Mailing List

RE: Question

2006-10-03 Thread Feliks Shvartsburd
Thanks, worked fine for me. Felix -Original Message- From: Chris Comparini [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 11:10 AM To: mysql@lists.mysql.com Subject: Re: Question On Tuesday 03 October 2006 10:57, Feliks Shvartsburd wrote: Does anybody know how can I see

Re: Innodb Locks

2006-10-03 Thread Jochem van Dieten
On 10/2/06, Robert DiFalco wrote: Is there a detailed source for when innodb creates row or table locks? The sourcecode. I have a situation where one thread is performing this in one transaction: UPDATE SomeTable SET WHERE SomeTable.id = N; This is invoked after another thread

Combined Primary Key and Auto Increment Primary Key

2006-10-03 Thread Chris White
Hi all, I had somewhat of a performance question. I have an association table with 2 unique values which will always be selected by one of the values (never by id). That said, I'm wondering which would be a better gain, having this: CREATE TABLE association_sample ( `id` INTEGER NOT NULL

RE: Question

2006-10-03 Thread George Law
show processlist gives you an abbreviated list of queries. show full processlist gives you the full queries. -Original Message- From: Feliks Shvartsburd [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 1:57 PM To: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: Question

Re: Combined Primary Key and Auto Increment Primary Key

2006-10-03 Thread Dan Buettner
Chris, I'd opt for the first, but with an index on each of association_id1 and association_id2. I like always having an identity column to be able to remove or update an individual entry easily. But for speed, you'll want indexes on the other columns. I would either do no multi-column indexes,

RE: Question

2006-10-03 Thread Feliks Shvartsburd
Hi I have several problems. I'm using MySql 5 and it is running on Linux. When I'm trying to execute mysql -u root -p I get the following: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) I'm also not able to stop the server. When I run mysql.server

RE: Combined Primary Key and Auto Increment Primary Key

2006-10-03 Thread Jerry Schwartz
Unless I completely misunderstand your question, I don't see how the id field would ever be of use. You said you aren't going to be selecting on id, only by one or the other of association_id1 or association_id2. If you are really worried about the importance of inserts / updates / deletes, and

RE: Returning value after insert

2006-10-03 Thread Price, Randall
You could use a stored procedure to do the INSERT and then return the value from SELECT statement. For example, DELIMITER $$; DROP PROCEDURE IF EXISTS `test`.`spINSERTandSELECT`$$ CREATE PROCEDURE `test`.`spINSERTandSELECT` (IN strFirstName VARCHAR(20),

RE: Innodb Locks

2006-10-03 Thread Robert DiFalco
No foreign key relationships. If I pull it into a temp table or a separate query that I then iterate through for all the updates on AnotherTable, then all works well. Odd. -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 11:09 AM To:

Re: Question

2006-10-03 Thread Gabriel PREDA
It's possible that mysql couldn't create the SOCKet file... For emergency connection use: mysql -u root -h 127.0.0.1 -p Do not use localhost as this instructs the client to go through the socket... but if you say 127.0.0.1 the client will use TCP... Next... make sure that mysql can indeed

Sorting numerically within a varchar

2006-10-03 Thread James Eaton
If I have the following strings in a varchar column: Piano Sonata 1 - Brendel Piano Sonata 10 - Brendel Piano Sonata 11 - Brendel Piano Sonata 12 - Brendel Piano Sonata 13 - Brendel Piano Sonata 14 - Brendel Piano Sonata 15 - Brendel Piano Sonata 16 - Brendel Piano Sonata 17 - Brendel Piano

Glitch in Query Optimizer

2006-10-03 Thread Robert DiFalco
Here's an odd one. I have a table called Elements and another table called ElementNames. The ElementNames table has a unique ID and a VARCHAR display name. The Elements table has a ElementName.ID, a node ID, a rule ID and some other stuff. I have an index on the NameID, NodeID, and RuleID. I

FreeBSD 6.1 + Libthr + MySQL 5.0.24a max connection issue or bug?

2006-10-03 Thread Abdullah Ibn Hamad Al-Marri
Hello folks, I hope Greg is reading this list I use MySQL 5.0.24a from the FreeBSD ports, with libthr threading. I have a huge app makes alot of connections to MySQL server. The max I could reach is 1500 threads, even I made the max connection in my.cf 5k and I used

table_cache not read

2006-10-03 Thread Robert Coggins
All, I asked this in the win32 list but not getting much of a response. Thought I would ask here since there seems to be more traffic. I am currently using a win/mysql solution. I am running into a problem where the table cache is not registering from the ini when the server starts. Below are

Self References Indexes

2006-10-03 Thread m i l e s
Hi, Can anyone tell me if this is the correct syntax for a self reference Index ? -- ALTER TABLE `RPI_CTYPE` ADD FOREIGN KEY (`RPI_CT_REPLCID`) REFERENCES `RPI_CTYPE`(`RPI_CT_ID`); -- CREATE INDEX RPI_H_REPLCID_idxfk ON RPI_HOW (RPI_H_REPLCID); M i l e s. -- MySQL General Mailing

Selecting last item

2006-10-03 Thread Deckard
Hello, What is the best approach to select the last row of a table ? Thank you. Warm regards, Deckard -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Glitch in Query Optimizer

2006-10-03 Thread Robert DiFalco
Scratch that, the only way to have the optimizer choose the correct index is to remove all compound indices that start with NodeID or move NodeID so that it is not the first column specified in the compound index. Ugh. Any ideas? -Original Message- From: Robert DiFalco [mailto:[EMAIL

Help ERROR 2002

2006-10-03 Thread nngau
I don't know what happened. I was doing a very big query and now I'm not Able to access mysql. This is the error I get when I try to use command: Mysql -u root -p ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) How do I fix this? This is affecting my

Re: Innodb Locks

2006-10-03 Thread Baron Schwartz
There is a detailed write-up on how locking works in the manual: http://dev.mysql.com/doc/refman/5.0/en/innodb-transaction-model.html If you are not doing replication, you might check out innodb_locks_unsafe_for_binlog as mentioned in

Re: Selecting last item

2006-10-03 Thread Jo�o C�ndido de Souza Neto
When i need to do it i use something like this: select * from table order by column desc limit 1; Deckard [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Hello, What is the best approach to select the last row of a table ? Thank you. Warm regards, Deckard -- MySQL

RE: Help ERROR 2002

2006-10-03 Thread nngau
Okay all seems to be fine now. All I did was restart the server for the 2nd time And now it seems to connect to mysql. Whew! I was starting to panic there. -Original Message- From: nngau [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 3:42 PM To: mysql@lists.mysql.com

Re: table_cache not read

2006-10-03 Thread Dan Buettner
Robert, I recall a similar issue on Windows a couple of months ago. The problem there was the presence of multiple ini files scattered about. Check your system for multiple ini files and consolidate remove the extras, perhaps. HTH, Dan On 10/3/06, Robert Coggins [EMAIL PROTECTED] wrote: All,

Stored Procedure Security Question

2006-10-03 Thread ddevaudreuil
When creating a stored procedure, you can set the sql security characteristic to either definer or invoker. As an example, I have a stored procedure that does a select from a table, and an application user (appuser) that calls the stored procedure. If the sql security is set to invoker, then

Re: RE: Glitch in Query Optimizer

2006-10-03 Thread Dan Buettner
Have you tried using the USE/IGNORE/FORCE INDEX optimizer hints? http://dev.mysql.com/doc/refman/5.0/en/join.html Sometimes, MySQL's optimize just doesn't make the best choice. Somewhat rare in my experience but it happens. HTH, Dan On 10/3/06, Robert DiFalco [EMAIL PROTECTED] wrote: Scratch

RE: RE: Glitch in Query Optimizer

2006-10-03 Thread Robert DiFalco
Thanks, I had seen that but I don't have a lot of flexibility for adding database specific extensions on a query by query basis. -Original Message- From: Dan Buettner [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 03, 2006 2:30 PM To: Robert DiFalco Cc: mysql@lists.mysql.com Subject:

creating indexes on a table already containing data

2006-10-03 Thread Angelo Zanetti
Hi all, I've got a database that has a few thousand rows, I've noticed that some of the search queries (especially the large ones) are taking some time. Im looking at adding indexes to my tables in order to speed up the data retrieval. My question is as follows: At this point in time if I

Re: Sorting numerically within a varchar

2006-10-03 Thread Dan Buettner
James, it is possible, if your number is always in the same relative position in the string (it is in the sample data you posted below). If it moves around a lot, you may be better off establishing some kind of sortorder column and populating it with your favorite scripting language. Actually

Re: creating indexes on a table already containing data

2006-10-03 Thread Dan Buettner
Angelo, results should be (nearly) immediate. When you add an index, MySQL creates an index for the existing data in your table. Later, when data is added/updated/deleted, the index is updated simultaneously. With a few thousand rows, you should be able to get by adding a few indexes where

Re: creating indexes on a table already containing data

2006-10-03 Thread Dan Nelson
In the last episode (Oct 03), Angelo Zanetti said: I've got a database that has a few thousand rows, I've noticed that some of the search queries (especially the large ones) are taking some time. Im looking at adding indexes to my tables in order to speed up the data retrieval. My question

Re: Glitch in Query Optimizer

2006-10-03 Thread Christian Hammers
On Tue, Oct 03, 2006 at 01:35:01PM -0700, Robert DiFalco wrote: Scratch that, the only way to have the optimizer choose the correct index is to remove all compound indices that start with NodeID or move NodeID so that it is not the first column specified in the compound index. Ugh. Any ideas?

Re: Sorting numerically within a varchar

2006-10-03 Thread mos
James, That wasn't too easy to figure out. But this will work: select * from Table1 order by substring_index(Music_Title,' ',2),-- Extracts first 2 words 0+Substring_Index(Substring_index(Music_Title,'-',1),' ',-2), -- Extracts the number substring_index(Music_Title,' ',-1)

Re: creating indexes on a table already containing data

2006-10-03 Thread Angelo Zanetti
Dan Nelson wrote: In the last episode (Oct 03), Angelo Zanetti said: I've got a database that has a few thousand rows, I've noticed that some of the search queries (especially the large ones) are taking some time. Im looking at adding indexes to my tables in order to speed up the data

Re: table_cache not read

2006-10-03 Thread Robert Coggins
Dan, Thanks for the reply... I wondered if this might be the case myself. However, I made a change the the variable query_cache_size in the same ini and it registered correctly after the service restart. Or, are you saying MySQL might be reading from multiple ini files? Well, either way in the

Re: table_cache not read

2006-10-03 Thread Robert Coggins
Well, I scoured the HDDs and I was unable to find additional my.ini files. Any other thoughts! Thanks again for your help! Robert Coggins wrote: Dan, Thanks for the reply... I wondered if this might be the case myself. However, I made a change the the variable query_cache_size in the

Re: table_cache not read

2006-10-03 Thread Robert Coggins
Well, I scoured the HDDs and I was unable to find additional my.ini files. Any other thoughts! Thanks again for your help! Robert Coggins wrote: Dan, Thanks for the reply... I wondered if this might be the case myself. However, I made a change the the variable query_cache_size in the

Re: creating indexes on a table already containing data

2006-10-03 Thread mos
At 05:42 PM 10/3/2006, you wrote: Dan Nelson wrote: In the last episode (Oct 03), Angelo Zanetti said: I've got a database that has a few thousand rows, I've noticed that some of the search queries (especially the large ones) are taking some time. Im looking at adding indexes to my tables

too many enum values?

2006-10-03 Thread Tanner Postert
how many is too many? i have a field with 21 possible values. each of the values are only 2 or 3 letter strings, but that seems like a lot, would it be faster/more efficient to put them in a separate table and just join?