Re: multiple primary keys on one table?

2006-10-06 Thread Martijn Tonies
> I have a primary key set on a table which consists of the combination of the > values: firstname, lastname, and a schedule_id (BIGINT(20))... I have this > so the records in this table do not have duplicates, being that no one > record should have the exact same name and schedule_id identifier.

Re: multiple primary keys on one table?

2006-10-06 Thread Gabriel PREDA
You will have to UPDATE to NULL those fields, modify the aplication to enter NULL instead of empty-string... Then add the UNIQUE INDEX... In MySQL (unless modified) the dafault is that NULL values are incomparable thus allowing the creation of a UNIQUE INDEX. -- -- -- -- -- -- -- -- -- -- -- --

Re: multiple primary keys on one table?

2006-10-06 Thread Renish
right... - Original Message - From: "Gabriel PREDA" <[EMAIL PROTECTED]> To: "Ferindo Middleton" <[EMAIL PROTECTED]> Cc: "Dan Buettner" <[EMAIL PROTECTED]>; Sent: Friday, October 06, 2006 6:31 PM Subject: Re: multiple primary keys on one table? You will have to UPDATE to NULL those fi

Memory Use

2006-10-06 Thread Ben Clewett
Dear MySql, Using: 5.1.11 on AIX (precompiled 64-bit) with 100% InnoDB, 4GB memory. Our MySql is consistently using 150% memory, or 50% paging space. Once it gets to 150%, it tends to stay at this limit consistently. I am trying to find a tool to tell me what it is using, and some documenta

Re: Replication

2006-10-06 Thread Eric Anderson
--replicate-wild-do-table=db_name.tbl_name replicates only updates that use the specified table in the given database. If any wild cald patterns specified, then match the specified database and table name patterns. Tells the slave thread to restrict replication to statements where any of the u

RE: How can I extract 3 IDs from only 2 columns/rows?

2006-10-06 Thread Jerry Schwartz
I'm a newbie, for sure, but can't you use OR to accomplish this? SELECT * FROM release_hack WHERE BID IN (5749, 7355, 6454) OR oBID IN (5749, 7355, 6454); Could it be as simple as I am? Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860

Re: speed up index creation on existing tables?

2006-10-06 Thread Dominik Klein
Sounds like a very nice idea to me, but this could be a problem if temp tables need to be bigger than RAM+Swap, which could easily be the case in a table with 100,000,000 rows. Gabriel PREDA schrieb: For this table this is to late... leave it running... If you want to do this on another table

Re: Memory Use

2006-10-06 Thread Dan Buettner
Ben, the my.cnf file (usually in /etc/my.cnf) usually contains the settings related to memory usage. You can see info on a lot of the various settings here: http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html and here for InndoDB-specific: http://dev.mysql.com/doc/refman/5.0/en/in

Re: Two Tables Comparator

2006-10-06 Thread Dan Buettner
Rich, it looks to me like your SQL should work - I've never used '!IN', always used 'NOT IN' instead, but that's not to say it won't work. I do note that you're missing the join criteria for your tables classes, signups ... Am I misunderstanding your question? Dan On 10/5/06, Rich <[EMAIL PROT

Bug or No bug - Composite Unique Key using null values

2006-10-06 Thread Dan Julson
List, I have been mulling over this for a few days reading docs and going back and forth with people on this, so I figured I would come here before writing up a bug report. First of all, I have tested this on 4.1.18, 5.0.16, and 5.0.22 within Solaris 9 and Mandrake Linux LE 2005 environments

Re: Bug or No bug - Composite Unique Key using null values

2006-10-06 Thread Dan Buettner
Dan, this is documented behavior: http://dev.mysql.com/doc/refman/5.0/en/create-index.html Specifically, "A UNIQUE index creates a constraint such that all values in the index must be distinct. An error occurs if you try to add a new row with a key value that matches an existing row. This constrai

Re: Bug or No bug - Composite Unique Key using null values

2006-10-06 Thread Martijn Tonies
> I have been mulling over this for a few days reading docs and going back and > forth with people on this, so I figured I would come here before writing up a > bug report. > > First of all, I have tested this on 4.1.18, 5.0.16, and 5.0.22 within Solaris > 9 and Mandrake Linux LE 2005 environments

Re: startup in OS-X

2006-10-06 Thread obed
On 10/6/06, Chris Elhardt <[EMAIL PROTECTED]> wrote: apologize for the newbie question. installed mySQL 4 some time ago, and just played around with it in terminal. Now that I really need to learn some database, I can't get it to start in terminal. it autostarts; I can see it in the activity m

Re: startup in OS-X

2006-10-06 Thread Rahul S. Johari
Usually mysql is located at /usr/local/mysql in the terminal window. Using Terminal, get to /usr/local/mysql/bin 'ls' will give you the list of files in the folder Try ./mysqld_safe > On 10/6/06, Chris Elhardt <[EMAIL PROTECTED]> wrote: >> apologize for the newbie question. >> >> installed myS

MySQL 5 query takes 100x longer than MySQL 4.1.10

2006-10-06 Thread mos
I have a simple query in MySQL 5.0.24: insert into table1 (col1) select distinct col1 from bigtable; that will run for 1:14:18. Both tables are MyISAM and table1 was just created with 2 columns and is empty. The "select distinct col1 from bigtable" takes only 2 minutes to run if I run it by

RE: How can I extract 3 IDs from only 2 columns/rows?

2006-10-06 Thread Daevid Vincent
Thanks for reply, but no, that isn't want I need. That query assumes I know all three IDs. I only know ONE ID (the CR I'm looking at currently), and I want to find the other two... DÆVID > -Original Message- > From: Jerry Schwartz [mailto:[EMAIL PROTECTED] > Sent: Friday, October 06, 2

Free chapter of O'Reilly High Performance MySQL on replication

2006-10-06 Thread Curious George
Thought this might be of interest to some on the list: http://www.oreilly.com/catalog/hpmysql/chapter/ch07.pdf -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: MySQL 5 query takes 100x longer than MySQL 4.1.10

2006-10-06 Thread Dan Buettner
Mike, was this a straight software upgrade on the same box? Any settings changes? Dan On 10/6/06, mos <[EMAIL PROTECTED]> wrote: I have a simple query in MySQL 5.0.24: insert into table1 (col1) select distinct col1 from bigtable; that will run for 1:14:18. Both tables are MyISAM and table1 w

A tricky Query

2006-10-06 Thread abhishek jain
Hi, I have a table like : ID date_from date_to price_code price dateadded 1 07:10:2006 31:12:2099 p11007:10:06 2 17:10:2006 31:12:2099 p12007:10:06 3 27:10:2006 31:12:2099 p11007:10:06 4 01:11:2006 31:12:2099 p12007:10:06 5 05:10:2

Re: MySQL 5 query takes 100x longer than MySQL 4.1.10

2006-10-06 Thread mos
At 09:37 PM 10/6/2006, Dan Buettner wrote: Mike, was this a straight software upgrade on the same box? Any settings changes? Dan Hi Dan, When I installed MySQL 5.0 I used the My.ini for dedicated server and edited it to use my old settings. I also noticed if I had InnoDb turned on,

Re: A tricky Query

2006-10-06 Thread Yashesh Bhatia
hi. can you give more details ? how is effective_price for today calculated - for example if u need price for 11th oct 2006, i'm assuming all u need is the price for date_from / date_to when there's a match in the range. yashesh bhatia. On 10/7/06, abhishek jain <[EMAIL PROTECTED]> wrote: Hi,

Sqsh + NULL Values

2006-10-06 Thread Ow Mun Heng
Hi, Anyone here familiar with sqsh? I'm trying to get bcp going here for replication between a MSSQL server(2000) to a MySQL server (5.0). Since I've not found any "decent" way to do the replication, I'm now using sqsh to do it via the CLI. $sqsh -S Server -U user -i ~/bcp.txt -L bcp_colsep=','

How to skip reading /etc/my.cnf by mysqld

2006-10-06 Thread dvd
Hi: I am trying to test mysql options and would like to have mysqld only read ~/.my.cnf instead of using the normal sequence to read /etc/my.cnf $datadir/my.cnf and ~/.my.cnf. This would prevent many unexpected issues in testing. But I could not find the way to disable the /etc/my.cnf. Any help w