SOLVED: Problem with *very* slow replication, FreeBSD 6.2

2007-11-03 Thread Christopher E. Brown
An update for those actually paying attention. I have been fighing unusual performance issues with replication between FreeBSD 6.2 machines. The unusual part is that while replication would never top 10 writes per second (even while the master was taking hundres of writes per second), the

Warning about truncated data

2007-11-03 Thread Pooly
Hi, I'm reloading a backup and I'm getting loads of warnings like : +-+--++ | Level | Code | Message| +-+--++ | Warning | 1265 | Data truncated for column

How to emulate a DATE() in MySQL 4.0?

2007-11-03 Thread mikesz
Hello mysql, I have a PHP script that I have written and it runs beautifully on current MySQL and PHP sites BUT, it barfs on MySQL 4.0 because I am using the DATE() to extract the Date from a timestamp. Does anyone remember how to do an equivalent function in 4.0? I have searched through hundreds

Re: append on insert

2007-11-03 Thread Brent Baisley
You would need to have an auto_increment field and your primary key would be the item id (or what you call it) field + the auto_increment field. Mysql will then handle incrementing the field if there is already a record with the same item id. Usually the auto_increment field will contain

Re: grouping

2007-11-03 Thread Brent Baisley
It sounds to me like you might be trying to find the standard deviation or the variance, which are functions you can use right in your query. On Nov 2, 2007, at 7:37 AM, Octavian Rasnita wrote: Hi, I have a table with the following columns: symbol date value I want to select all the

Re: How to emulate a DATE() in MySQL 4.0?

2007-11-03 Thread Baron Schwartz
[EMAIL PROTECTED] wrote: Hello mysql, I have a PHP script that I have written and it runs beautifully on current MySQL and PHP sites BUT, it barfs on MySQL 4.0 because I am using the DATE() to extract the Date from a timestamp. Does anyone remember how to do an equivalent function in 4.0? I

Re: append on insert

2007-11-03 Thread Baron Schwartz
Kevin Waterson wrote: I have a table of item I wish to have the value of the item incremented if there is a duplicate. I looked at ON DUPLICATE KEY UPDATE but this modifies the exsisting value. If the item is my-item and this already exists, I need to make it my-item-2 or even my-item-123 where

Which is faster when deleting rows? In() or Separate Delete stmts?

2007-11-03 Thread mos
If I have a large table with 20 million rows, is it going to be faster to use one delete statement like: delete from mytable where rcdid in(20,300,423, 9) to delete 10-100 random records using the primary index RcdId or should I use separate delete statements for each RcdId as in:

Account Problems. Can't register server with new account

2007-11-03 Thread AlejandraB
Good evening. I have mysql cluster installed and I'm trying to start the mysql server with a new user account recently created, and I'm having trouble accessing the server with the new account. [EMAIL PROTECTED] bin]# ./mysql -u usuario1 -p Enter password: ERROR 1045 (28000): Access denied

Re: Which is faster when deleting rows? In() or Separate Delete stmts?

2007-11-03 Thread Baron Schwartz
Hi mos wrote: If I have a large table with 20 million rows, is it going to be faster to use one delete statement like: delete from mytable where rcdid in(20,300,423, 9) to delete 10-100 random records using the primary index RcdId or should I use separate delete statements for each

Foreign keys on non-unique columns (problem)

2007-11-03 Thread Yves Goergen
Hi, I have a problem with my foreign keys. I have the following two tables: CREATE TABLE keylist ( KeylistId INTEGER NOT NULL, UserId INTEGER NOT NULL, PRIMARY KEY (KeylistId, UserId)); CREATE TABLE user ( UserId INTEGER NOT NULL PRIMARY KEY, AdditionalKeylist INTEGER); A

Re: append on insert

2007-11-03 Thread Kevin Waterson
This one time, at band camp, Baron Schwartz [EMAIL PROTECTED] wrote: INSERT INTO item (`key`) SELECT CONCAT('my-item', (SELECT IF(COUNT(*) = 0, '', CONCAT('-', COUNT(*))) FROM item WHERE `key` LIKE 'my-item%')); Kevin, this design is not first normal form and will cause you

Re: Foreign keys on non-unique columns (problem)

2007-11-03 Thread Yves Goergen
On 03.11.2007 22:52 CE(S)T, Yves Goergen wrote: Is my design bad? I should explain why I do it this way at all. There's some other tables in my system that need to keep a list of keys (i.e. user IDs) for several actions. A message (one of the tables) has one keylist for read access, one for

Re: mysql claims table does not exist. but it does

2007-11-03 Thread Kim Briggs
On Oct 31, 2007 3:22 AM, robert rottermann [EMAIL PROTECTED] wrote: Hi there, I have a strange problem. I am using Server version: 5.0.45 SUSE MySQL RPM I made a backup of a database by copying its directory like so: mv urulu urulu_X then I recreateded the database, played a little with it