several master for one slaveserver for backup purpose?

2006-06-20 Thread Eric Persson
Hi, I've been thinking about setting up a slave server for a few of my mysqlservers for extra backup safety. Some of the databases are quite large, about 50gb so a mysqldump is very clumsy to handle. And near to live backups would be nice to have in a panic situation. What I dont know is if

Change on LEFT JOIN ON syntax in 5.x?

2006-02-20 Thread Eric Persson
Hi, I have a query which works fine for me in my 4.1 environment, but when moved to the 5.0.18 environment, it fails with the result below: mysql> SELECT r.uid, u.username, u.image_type, count(id) AS antal, s.timestamp FROM recruits_uid r, users u, users u2 LEFT JOIN sessions s ON s.uid=u.ui

Re: delete with an offset?

2005-10-21 Thread Eric Persson
Dobromir Velev wrote: delete from where to_uid=1 and read_timestamp>0 and timestamp<(select timestamp from messages where to_uid=1 and read_timestamp>0 order by timestamp desc limit 100,1) HTH Thanks for your answer, I guess i'll have to do with two queries, but it looked like such and ide

delete with an offset?

2005-10-21 Thread Eric Persson
Hi, Is it possible to delete from a table with some sort of offset? I did the following select query, which selects a message from a message table. select id, subject from messages where to_uid=1 and read_timestamp>0 order by timestamp desc limit 3,1; The reason is I only want it to be 3 me

Re: ibdata1 grows beyound borders..

2005-04-26 Thread Eric Persson
Gleb Paharenko wrote: Hello. Searching in the archives says you could get worse performance, because of extending during transactions: Yes, read a few of those, but how about the fix for this, will the data rearrange itself automatically when I specify more files? //Eric -- MySQL General Mailing

ibdata1 grows beyound borders..

2005-04-26 Thread Eric Persson
Hi, I've been running a innodbdatabase for a while, and it works nice, however, I've noticed that it have grown beyound the specifications in the my.cnf file. I did define autoextend so its not very strange, however, I was wondering, how far can it grow, and is it a bad idea to just let it grow

faster integer compare?

2004-10-23 Thread Eric Persson
Hi, I'm using mysql with php and have recently made some effort optimizing all queries on a project and I noticed something strange and wanted to check if this is correct. Lets say I have a table looking like this: CREATE TABLE `profile_visitors` ( `profile_owner` int(10) unsigned NOT NULL def

Re: Optimize query, avoid 'using temporary'

2003-04-02 Thread Eric Persson
Stefan Hinz wrote: The query I used looks like this: SELECT files.file_id, filename FROM access, files WHERE directory_id="0" AND lang_id="1" AND ( files.file_id=access.conn_id AND access.group_id IN (1) AND access.class_id="4" AND class_tbl="file" ) group by file_id order by filename; Just a

Optimize query, avoid 'using temporary'

2003-04-01 Thread Eric Persson
Hi, I have a query which I did several months ago, it recently caught my attention since it seems to be very slow when done a lot of times, which causes a very loaded server. Its a webbased filesystem, which stores access/file information in mysql, the actual files are stored on disk. The prob

Optimize query, avoid 'using temporary'

2003-04-01 Thread Eric Persson
Hi, I have a query which I did several months ago, it recently caught my attention since it seems to be very slow when done a lot of times, which causes a very loaded server. Its a webbased filesystem, which stores access/file information in mysql, the actual files are stored on disk. The problem

Re: Maximize Performance by Improving Search Program Logic - Help?

2002-10-10 Thread Eric Persson
David Jourard wrote: > It consists of 2 tables: word and content. > > content consists of 2 fields: > >rec_id int unsigned not null, >description varchar(200) not null > > > word consists of 2 fields: > word varchar(50) not null, >

Scale mysqlservers

2002-02-12 Thread Eric Persson
Hi ! What is the usual approach when its needed to scale a mysqlserver. Of course 1 server can be extended and upgraded in a number of ways. But is it possible to have a cluster of server who works together and share the load? So servers can be taken in and out of the cluster without much work?

myisamchk: error: 22

2001-09-27 Thread Eric Persson
Hi ! I got a power failure on my database machine and now I cant start it since I got a error 22 when I start it. How do I fix this? And what does error 22 mean? I looked at http://www.mysql.com/doc/R/e/Repair.html but nothing there seems to fix it. //eric

Re: KEY and index

2001-06-23 Thread Eric Persson
Daniel Ã…kerud wrote: > In MySQL having a table that looks like this: > > idint primary key > namechar(200) > > and making an index on name, will get you a 0.1 * original_retrieval_time > when searching, but 1.5*original_insertion_time when inserting. It roughly > means that (on my system

Re: mysql.sock

2001-06-15 Thread Eric Persson
Marek Mahdal wrote: > > Hi, > I have a problem with MySQL. > I am running Redhat Linux 6.1, MySQL 3.23.38 and PHP 4.0. > The command line client mysql is working perfectly. But if i try to connect to the >MySQL server from a web site using PHP I get this error message: > > Warning: MySQL Con

Re: Updating non-existant records...

2001-05-29 Thread Eric Persson
Randolpho St John wrote: > > Hello all. I'm new to the list, and I just have a quick question. > Hopefully somebody can help me out. > > Anyway, here's the basics of what I want to do: > > I want to update a record or, if that record does not exist, create a > new one. Try the REPLACE... query.