Patching MySQL CLI to log information

2011-06-02 Thread Andrew Braithwaite
Has anyone ever patched the MySQL or libmysql to log to some logfiles with information like the UNIX user, time, server connected to, port etc? I'm just trying to save myself a bit of C patching. Cheers, A

Strange date behaviour

2011-03-31 Thread Andrew Braithwaite
Hi, Mysql select curdate() + interval 6 month - interval 6 month; +-+ | curdate() + interval 6 month - interval 6 month | +-+ | 2011-03-30 |

RE: Index analyser

2010-02-24 Thread Andrew Braithwaite
There's also the Query Analyser http://www.mysql.com/products/enterprise/query.html which is part of MySQL Enterprise - I've never used it and it is very expensive but I believe it will advise on optimal indicies. Cheers, Andrew -Original Message- From: Cantwell, Bryan

RE: Index analyser

2010-02-24 Thread Andrew Braithwaite
You can use this to get rid of unused indicies too. http://www.mysqlperformanceblog.com/2009/01/15/dropping-unused-indexes/ Requires the percona extensions to be loaded. Cheers, Andrew -Original Message- From: Andrew Braithwaite [mailto:andrew.braithwa...@lovefilm.com] Sent: 24

RE: Optimizing my.cnf

2009-10-06 Thread Andrew Braithwaite
If it's a dedicated MySQL server I would increase the key buffer to at least half the available main memory and leave the rest for filesystem cache. You'll probably get the biggest performance increase this way. Cheers, A -Original Message- From: sangprabv [mailto:sangpr...@gmail.com]

RE: Mysql dynamic database location

2009-09-18 Thread Andrew Braithwaite
http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld _datadir You can specify the data directory at runtime with the --datadir= option to mysqld (mysqld_safe). Cheers, A -Original Message- From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De

RE: 1 Machine with 4 GB RAM for Big Size MySQL Data Size

2009-09-05 Thread Andrew Braithwaite
One word: Backups! If your potential client must restrict you to one server then your primary consideration in this design must be backups, this cannot be stressed enough. One server with 4GB main memory should be fine for your 24GB database with small monthly growth and low number of users, you

Replication - connecting a slave to a master on the same host via a port or socket

2009-08-11 Thread Andrew Braithwaite
Hi, I have 2 mysql instances running on a server on different ports with different datadirs and different .sock files. I can connect locally via the sock with the -S flag to mysql but I cannot connect locally via port (-P flag). Does anyone know if there is a way to configure a mysql slave to

RE: Replication - connecting a slave to a master on the same host via a port or socket

2009-08-11 Thread Andrew Braithwaite
Ah. I have found that if you use 'localhost' to connect, you cannot specify a port, it silently fails... You can connect using a hostname (even though it's the same server), specifying a port... Andrew -Original Message- From: Andrew Braithwaite [mailto:andrew.braithwa...@lovefilm.com

RE: Growing database Performance

2009-06-29 Thread Andrew Braithwaite
Would it be beneficial to divide this database tables across different databases where each database holds some tables? If you are planning to scale to large amounts of database activity in the future then yes, this will help very much. If you split your tables into several logical

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

RE: ibdata1 lost

2009-05-27 Thread Andrew Braithwaite
Hi, Your data is gone (unless you can undelete it from whatever filesystems you're using). You should be able to recover the schema from the directories and .frm files by doing something like this hack: 1. Take a copy of your .frm files and keep them somewhere safe. 2. Create a database with

RE: Inserting a default null date

2009-05-15 Thread Andrew Braithwaite
Agreed. And don't forget to listen to the warnings MySQL sends back, e.g.: mysql create table temp_date(d date default null); Query OK, 0 rows affected (0.15 sec) mysql insert into temp_date(d) values('2009-13-99'); Query OK, 1 row affected, 1 warning (0.00 sec) mysql show warnings;

RE: Merging Databases

2009-05-11 Thread Andrew Braithwaite
If you are merging table A and table B and say, table A's auto-increment id is up to 2000, just pick a nice round number like 3000 and add it to the auto-increment ID column of table B with something like this: UPDATE tableB SET id = id + 3000; Then do the same to all the fields in other tables

RE: Default my.cnf for (very) high performance servers....

2009-05-06 Thread Andrew Braithwaite
There's no such thing as a generic my.cnf for high performance MySQL servers, you will need to provide more information.. Some questions: Are you going to run InnoDB or MyISAM or both (if both, what's the split?) Is there anything else running on that server? i.e. how much of the 16GB is

RE: Default my.cnf for (very) high performance servers....

2009-05-06 Thread Andrew Braithwaite
14:31 To: Andrew Braithwaite Cc: mysql@lists.mysql.com Subject: Re: Default my.cnf for (very) high performance servers Andrew Braithwaite wrote: There's no such thing as a generic my.cnf for high performance MySQL servers, you will need to provide more information.. Well, I was more after

RE: Creation date

2009-05-05 Thread Andrew Braithwaite
The create date in show table status is metadata held in the table itself wheras the create data on the .frm file is when that file was created - i.e. if you copy the data files (without preserving attributes) it will have a new creation date on the filesystem but the metadata of the table will

RE: Slowness connecting to MySQL

2009-05-04 Thread Andrew Braithwaite
It could be slow reverse DNS lookups. Make sure the hostname/IP of the client are in the server's host file. Or try connecting to the server using an IP address instead of hostname. Andrew -Original Message- From: Menachem Bazian [mailto:gro...@bcconsultingservices.com] Sent: 04 May

RE: Index time columns?

2009-04-27 Thread Andrew Braithwaite
Hi, If you have that date column in your where clause for example: SELECT .. FROM . WHERE tstamp NOW() - INTERVAL 1 WEEK; Then it's essential to index that column to speed up a table with lots of data. On a table with many rows, an index on a timestamp column is invaluable. However,

RE: Is Temporary table right approach

2009-04-17 Thread Andrew Braithwaite
If you can not eliminate your temporary tables, you have to adjust the following parameters in my.cnf [mysqld] max_heap_table_size=1G tmp_table_size=1G You're making a lot of assumptions about this guy's setup. You shouldn't just tell him to apply these kinds of settings as you don't what

RE: MySQL replication status plugin

2009-04-15 Thread Andrew Braithwaite
You could try this: http://www.consol.de/opensource/nagios/check-mysql-health (in German but should be self-explanatory). Cheers, Andrew -Original Message- From: Gabriel - IP Guys [mailto:gabr...@impactteachers.com] Sent: 15 April 2009 10:12 To: replicat...@lists.mysql.com Cc:

RE: Annoying .mysql_history problem

2009-04-03 Thread Andrew Braithwaite
I know it's not quite the same but you can use a 'tee' to record what you do. I use a small script to invoke the mysql client that looks like this: and...@myserver:~/bin cat ms # takes input of server and logical DB, eg: 'ms db1 test' echo/home/andrew/mysqlhistory/$1.history echo

Looking at the MySQL binlog and pulling the queries onto one line

2008-11-21 Thread Andrew Braithwaite
Hi, I can convert the binlogs to text using mysqlbinlog and that works fine. However; I have queries that span several lines e.g. : SELECT blah FROM t1 WHERE some condition ORDER BY something Does anyone know of any utilities to reformat binlogs so that the queries are all on a

RE: Optimal MySQL server -- opinions?

2008-04-29 Thread Andrew Braithwaite
Hi, Three things... 1. You need to let us know what the DB server will be doing. Many CPU cores are only important of you have many CPU intensive MySQL connections in parallel. Will you have a read-intensive or write-intensive database load? Those 2950III you're considering can take up to 8

RE: Performance problem - MySQL at 99.9% CPU

2008-01-02 Thread Andrew Braithwaite
Hi, If you can follow this document: http://www.ufsdump.org/papers/uuasc-june-2006.pdf You should be able to figure out what's happening. Cheers, Andrew -Original Message- From: Gunnar R. [mailto:[EMAIL PROTECTED] Sent: Tue, 01 January 2008 23:31 To: mysql@lists.mysql.com Subject:

MySQL 5.0.27 replication problems

2007-09-28 Thread Andrew Braithwaite
Hi, I keep getting the below in the error log. I can't see any problems (no other errors and replication is working) and the master DB is available the whole time. 070928 12:07:31 [Note] Slave: received end packet from server, apparent master shutdown: 070928 12:07:31 [Note] Slave I/O thread:

thread_concurrency in linux

2007-08-31 Thread Andrew Braithwaite
Hi, Does anyone know if thread_concurrency works in linux or is it just limited to Solaris and Windows? I know the general rule is number of CPU's*2 but will this actually have any effect with Linux's threading model? Thanks for any help :) Andrew Mysql, query This message has been scanned

thread_concurrency in linux

2007-08-29 Thread Andrew Braithwaite
Hi, Does anyone know if thread_concurrency works in linux or is it just limited to Solaris and Windows? I know the general rule is number of CPU's*2 but will this actually have any effect with Linux's threading model? Thanks for any help :) Andrew Mysql, query This message has been scanned

RE: thread_concurrency in linux

2007-08-29 Thread Andrew Braithwaite
Hi, Just to make it clear; I mean thread_concurrency, not innodb_thread_concurrency. Cheers, Andrew From: Alex Arul Lurthu [mailto:[EMAIL PROTECTED] Sent: Wed, 29 August 2007 10:10 To: Andrew Braithwaite Cc: mysql@lists.mysql.com Subject: Re

thread_concurrency in linux

2007-08-24 Thread Andrew Braithwaite
Hi, Does anyone know if thread_concurrency works in linux or is it just limited to Solaris and Windows? I know the general rule is number of CPU's*2 but will this actually have any effect with Linux's threading model? Thanks for any help :) Andrew Mysql, query This message has been scanned

RE: seoparator help

2007-08-23 Thread Andrew Braithwaite
mysql select format(300,0); +---+ | format(300,0) | +---+ | 3,000,000 | +---+ 1 row in set (0.00 sec) mysql select format(300,2); +---+ | format(300,2) | +---+ | 3,000,000.00 |

Group by and concatenate

2006-10-11 Thread Andrew Braithwaite
Hi, I have the following data: mysql select Dealername,pc from ford_gb where pc='LE4 7SL'; +-+-+ | Dealername | pc | +-+-+ | CD Bramall Ford - Leicester | LE4 7SL | | CD Bramall Ford - Leicester | LE4

RE: Group by and concatenate

2006-10-11 Thread Andrew Braithwaite
| LE4 7SL | LE4 7SL | | CD Bramall Trucks | LE4 7SL | LE4 7SL,LE4 7SL | ++-+--+ Andrew -Original Message- From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] Sent: Wed, 11 Oct 2006 14:32 To: mysql@lists.mysql.com Subject: Group

RE: comparing two databases

2006-09-29 Thread Andrew Braithwaite
Some freebies: PHP: http://sourceforge.net/projects/phpmycomparer Perl: http://freshmeat.net/projects/mysqldiff/ Cheers, Andrew -Original Message- From: Steve Buehler [mailto:[EMAIL PROTECTED] Sent: Thu, 28 Sep 2006 21:06 To: mysql Subject: comparing two databases Is there a

Last access time of a table

2006-02-03 Thread Andrew Braithwaite
Hi everyone, Does anyone know if there is a way to get the last access time from a mysql table through mysql commands/queries? I don't want to go to the filesystem to get this info. I understand that this could be tricky especially as we have query caching turned on and serve quite a few sql

Subquery strangeness when used in FROM clause

2005-12-06 Thread Andrew Braithwaite
Hi, I'm having a problem with subqueries in MySQL 4.1.14 running on Fedore core 3. mysql create table day_6_12_2005 (f1 int(1), f2 char(4)); Query OK, 0 rows affected (0.04 sec) mysql insert into day_6_12_2005 values(1,'test'); Query OK, 1 row affected (0.00 sec) mysql select * from (select

Resend: 4.1 replication logs growing at a much greater rate than with 4.0

2005-10-04 Thread Andrew Braithwaite
Hi all, I have just upgraded a master slave database system from 4.0 to 4.1. the replication binlogs are now growing at a vastly greater rate. The queries going through are the same. Did 4.0 use some kind of compression by default or something? Does anyone have any idea what's going on with

RE: Resend: 4.1 replication logs growing at a much greater rate than with 4.0

2005-10-04 Thread Andrew Braithwaite
has experienced by the looks of it. Thanks for the help anyway. Cheers, Andrew From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tue, 04 Oct 2005 14:32 To: Andrew Braithwaite Cc: mysql@lists.mysql.com Subject: Re: Resend: 4.1 replication logs

4.1 replication logs growing at a much greater rate than with 4.0

2005-10-03 Thread Andrew Braithwaite
Hi all, I have just upgraded a master slave database system from 4.0 to 4.1. the replication binlogs are now growing at a vastly greater rate. The queries going through are the same. Did 4.0 use some kind of compression by default or something? Does anyone have any idea what's going on

RE: How to match a binary null in a varchar column???

2005-10-03 Thread Andrew Braithwaite
Hi, You could try the binary operator: http://dev.mysql.com/doc/mysql/en/charset-binary-op.html Cheers, Andrew -Original Message- From: Richard F. Rebel [mailto:[EMAIL PROTECTED] Sent: Mon, 03 Oct 2005 17:48 To: Untitled Subject: How to match a binary null in a varchar column???

possible MySQL bug - insert into 'double' column problem with mysql 4.1

2005-09-19 Thread Andrew Braithwaite
Hi All, I have a strange error when trying to insert into a table with 2 'double' fields. It inserts into the 1st field OK but fills the 2nd one with nines. See below for a complete recreate. Is this a known problem? Does anyone have a solution? I'm running standard MySQL binaries on redhat

RE: possible MySQL bug - insert into 'double' column problem with mysql 4.1

2005-09-19 Thread Andrew Braithwaite
Thanks; you're absolutely right - doh! It's just amazing that this ever worked in MySQL 4.0 and below... Andrew -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED] Sent: Mon, 19 Sep 2005 12:27 To: mysql@lists.mysql.com Cc: Andrew Braithwaite Subject: Re: possible MySQL bug

Re: possible MySQL bug - insert into 'double' column problem with mysql 4.1

2005-09-19 Thread Andrew Braithwaite
| +---+---+---+ 2 rows in set (0.06 sec) Looks like while MySQL 4.1 was not changing what was stored in the data but changing what is inserted into new records to match the proper data tye definitions. On 19/9/05 17:49, Andrew Braithwaite [EMAIL PROTECTED] wrote: Thanks; you're absolutely right

Re: slow count(1) behavior with large tables

2005-07-15 Thread Andrew Braithwaite
Hi, You're doing a join on 'BoardID' on the tables MSGS and MBOARD. Is the BoardID field indexed on the MSGS table too? If not then that may be your problem. Cheers, Andrew On 15/7/05 23:31, Jon Drukman [EMAIL PROTECTED] wrote: i'm trying to run this query: SELECT COUNT(1) FROM MSGS m,

Re: Group By query optimization

2005-07-15 Thread Andrew Braithwaite
Hi, Put indexes on 'valid' and 'sessiontype' and all will be good. Cheers, Andrew On 15/7/05 18:26, Kishore Jalleda [EMAIL PROTECTED] wrote: Hi All, I have a mysql query which takes 8 seconds to run ona dual xeon 2.4, 3Gig ram box, SELECT gamename, MAX(score) AS score,

Re: slow count(1) behavior with large tables

2005-07-15 Thread Andrew Braithwaite
Sorry, I meant to say is the 'BoardID' field indexed on the MBOARD table too? Cheers, A On 16/7/05 00:01, Andrew Braithwaite [EMAIL PROTECTED] wrote: Hi, You're doing a join on 'BoardID' on the tables MSGS and MBOARD. Is the BoardID field indexed on the MSGS table too

RE: Remove 1st 3 Chars

2005-05-11 Thread Andrew Braithwaite
Hello, Is there any way to get MySQL to return the results of this query with the 'fieldname' in the order listed in the in() bit? select fieldname from tablename where fieldname in ('B4079','B4076','B4069','B4041','A4710','58282','58220','56751','56728'

RE: Help with a tricky/impossible query...

2005-04-14 Thread Andrew Braithwaite
van den Berg [mailto:[EMAIL PROTECTED] Sent: Thu 14 April 2005 10:47 To: MySQL Cc: Andrew Braithwaite Subject: Help with a tricky/impossible query... Hi, In SQL you need to define the data that you want to work with: create table z ( z int(5) not null primary key); insert into z values (1),(2),(3

Re: Query Performance

2005-04-14 Thread Andrew Braithwaite
You could probably save a bit of processing time by changing: concat(date_format(from_unixtime(time), %d/%m/%Y), - , time_format(from_unixtime(time), %H:%i)) to: date_format(from_unixtime(time), %d/%m/%Y - %H:%i) This would mean half the date conversions would be executed. Separating out the

Help with a tricky/impossible query...

2005-04-13 Thread Andrew Braithwaite
Hi, I need some help with a tricky query. Before anyone asks, I cannot bring this functionality back to the application layer (as much as I'd like to). Here's what I need to do... create table wibble( seq int(3) auto_increment primary key, x int(5), y int(5) ); insert into wibble set x=5,

Re: Help with a tricky/impossible query...

2005-04-13 Thread Andrew Braithwaite
I should mention that I'm constrained to version 4.0.n so no sub queries for me! Andrew On 14/4/05 1:11 am, Andrew Braithwaite [EMAIL PROTECTED] wrote: Hi, I need some help with a tricky query. Before anyone asks, I cannot bring this functionality back to the application layer (as much

Re: Changing the Prompt for timing purposes

2005-04-13 Thread Andrew Braithwaite
When you say shell, do you mean DOS or UNIX? If it's the latter then you may do this for the logfile: sh-2.05b# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.0.24-standard-log Type 'help;' or '\h' for help. Type '\c' to clear

RE: Can't create a new thread (errno 11). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug'

2005-04-07 Thread Andrew Braithwaite
there are more than 1100 mysql connections connected to the same server. What about ulimits and free memory of your system? Andrew Braithwaite [EMAIL PROTECTED] wrote: Hi, Yes - am using the standard binaries and have even upgraded to mysql-standard-4.1.10a-pc

RE: Can't create a new thread (errno 11). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug'

2005-04-01 Thread Andrew Braithwaite
/doc/mysql/en/crashing.html Andrew Braithwaite [EMAIL PROTECTED] wrote: Hi, I'm getting this strange error when there are more than 1100 mysql connections connected to the same server. [EMAIL PROTECTED] mysql]# bin/mysql bin/mysql: connect to server at 'localhost' failed error: 'Can't

MySQL inserts and disk full - how to handle gracefully?

2005-04-01 Thread Andrew Braithwaite
Hi All, When you do a insert into a MySQL database and the disk is full, the insert just hangs waiting for that table to become available. This is fine for applications that care about data integrity. In this case I care more about availability and speed and would prefer it if the inserts

MySQL inserts and disk full - how to handle gracefully?

2005-03-30 Thread Andrew Braithwaite
Hi All, When you do a insert into a MySQL database and the disk is full, the insert just hangs waiting for that table to become available. This is fine for applications that care about data integrity. In this case I care more about availability and speed and would prefer it if the inserts

Can't create a new thread (errno 11). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug'

2005-03-30 Thread Andrew Braithwaite
Hi, I'm getting this strange error when there are more than 1100 mysql connections connected to the same server. [EMAIL PROTECTED] mysql]# bin/mysql bin/mysql: connect to server at 'localhost' failed error: 'Can't create a new thread (errno 11). If you are not out of available memory, you can

RE: Delays in replication and internet latency

2005-03-14 Thread Andrew Braithwaite
@lists.mysql.com Subject: Re: Delays in replication and internet latency Hello. You may use --slave_compressed_protocol=1. See: http://dev.mysql.com/doc/mysql/en/replication-options.html Andrew Braithwaite [EMAIL PROTECTED] wrote: Hi, We have replication running here and it has been excellent

Delays in replication and internet latency

2005-03-11 Thread Andrew Braithwaite
Hi, We have replication running here and it has been excellent for a number of years. Recently we have been having lag in replication from London to Palo Alto (Plenty of bandwidth but a latency of 300ms round trip). The replications binlogs are being written at a rate of about 100MB to

Possible bug with wait_timeout

2004-12-02 Thread Andrew Braithwaite
Hi all, In version 4.0.18 when setting the wait_timeout variable to 10 in my.cnf, it seems to work when looking at 'mysqladmin variables' as it is indeed showing up as 10. However, when in the mysql client and I do a 'show variables' it is showing up with the default value of 28800. I'm certain

RE: Slave replication problem

2004-09-06 Thread Andrew Braithwaite
did you get an answer to your problem yet? If not I may be able to help.. Andrew From: Jeff McKeon [mailto:[EMAIL PROTECTED] Sent: Fri 03/09/2004 15:29 To: [EMAIL PROTECTED] Subject: Slave replication problem Hello all, We had a power outage this morning

RE: CIDR ranges in MySQL permissions?

2004-07-22 Thread Andrew Braithwaite
Hi All, Can I assume by the lack of any responses that the anwser to my question is no? Cheers, Andrew -Original Message- From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] Sent: Tuesday 20 July 2004 16:44 To: [EMAIL PROTECTED] Subject: RE: CIDR ranges in MySQL permissions? Sorry

CIDR ranges in MySQL permissions?

2004-07-20 Thread Andrew Braithwaite
Hi All, Has anyone had any experience with using IP address ranges in MySQL permissions? It would be easy if you had a whole class C for example because you would be able to do: Grant all privileges on *.* to someuser@'192.87.12.%'; But if you only wanted to give permissions to a CIDR range

RE: CIDR ranges in MySQL permissions?

2004-07-20 Thread Andrew Braithwaite
Sorry - a /32 is a single ip - I meant a /27 :) A -Original Message- From: Andrew Braithwaite [mailto:[EMAIL PROTECTED] Sent: Tuesday 20 July 2004 16:16 To: [EMAIL PROTECTED] Cc: Karl Skidmore Subject: CIDR ranges in MySQL permissions? Hi All, Has anyone had any experience with using

RE: Advice on Database Scheme

2004-06-04 Thread Andrew Braithwaite
Hi, Can I ask what you used to render that .gif ? Looks like phpMyAdmin but I have never seen that feature in phpMyAdmin.. Thanks, Andrew -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Friday 04 June 2004 16:19 To: David Blomstrom Cc: [EMAIL PROTECTED]

problem with totals doubling when using a right join....

2004-06-02 Thread Andrew Braithwaite
Hi All, I have a problem. I have 2 tables: mysql SELECT int_traffic.day, sum(int_traffic.deliveries) as deliveries - FROM int_traffic - WHERE int_traffic.day between '2004-05-01' and '2004-05-31' - GROUP BY int_traffic.day - ORDER BY int_traffic.day; +++

Running MySQL and PostgreSQL on the same hardware

2004-05-26 Thread Andrew Braithwaite
Hi All, Does anyone have any experience of running MySQL and PostgreSQL on the same hardware? At the moment we have several reasonable fast servers (dual Xeon GHz, 1GB ram, 15,000rpm scsi disk) running MySQL in a replicated environment with high volumes of queries (high read:write ratio) and I

RE: Running MySQL and PostgreSQL on the same hardware

2004-05-26 Thread Andrew Braithwaite
10:53 To: Andrew Braithwaite; [EMAIL PROTECTED] Subject: RE: Running MySQL and PostgreSQL on the same hardware Andrew I've done it but only in a test environment. I actually had 3 different versions of Mysql running plus Postgres. Each of the Mysql's and Postgress were installed to /opt/database

RE: slow insert into select statement

2004-05-26 Thread Andrew Braithwaite
Hi, I would start with finding out if it's the select or the insert that's taking a long time... Does the priceLast5 table have heavy indexes to build? Try running the select seperately and see how long it takes... Andrew -Original Message- From: Victor Pendleton [mailto:[EMAIL

Title Case

2004-05-05 Thread Andrew Braithwaite
Hi All, I have a table with upper case text. I want to use a function in my select statement the puts this text in title case so MORE FOO YOU WIBBLE becomes More Foo You Wibble. Thanks for any help Cheers, Andrew Sql, query -- MySQL General Mailing List For list archives:

Title Case Problem

2004-05-05 Thread Andrew Braithwaite
Hi All, I have a table with upper case text. I want to use a function in my select statement the puts this text in title case so MORE FOO YOU WIBBLE becomes More Foo You Wibble. Thanks for any help Cheers, Andrew Sql, query -- MySQL General Mailing List For list archives:

RE: Batch table structure update tool

2004-03-20 Thread Andrew Braithwaite
Hi, The only utility I know about that does this kind of thing is mysqldiff which can be found at: http://freshmeat.net/projects/mysqldiff/ I haven't used it myself but it comes quite highly rated on freshmeat.net A quote from it's description: mysqldiff is a Perl script which compares the

RE: String Concatenation Operator?

2004-03-18 Thread Andrew Braithwaite
or must you use the CONCAT() function? Yes SELECT concat(firstname,' ',lastname) AS fullname FROM customers; Cheers, Andrew -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: Thursday 18 March 2004 22:30 To: [EMAIL PROTECTED] Subject: String Concatenation Operator?

RE: Maintaining fulltext

2004-03-18 Thread Andrew Braithwaite
Not sure if you can... Maybe add it to the ToDo list at: http://www.mysql.com/doc/en/Fulltext_TODO.html Cheers, Andrew p.s. also see you at the conference... -Original Message- From: Trevor Price [mailto:[EMAIL PROTECTED] Sent: Thursday 18 March 2004 21:10 To: [EMAIL PROTECTED]

RE: Advise on High Availability configuration

2004-02-02 Thread Andrew Braithwaite
Hi, OK - I'll try to explain in as much detail as I can.. We have redhat linux apache webservers running our apps with fcgi (which uses persistant DB connections). We have about 8 of these. It's important to understand that our MySQL system is optimised for a read-heavy / write-light site

RE: Multiple mysql servers with the same datadir

2004-02-02 Thread Andrew Braithwaite
Hi, But when runing multiple myisam enable-external-locking database servers with the same NFS datadir, will there be any deadlock problems? I have no experience in this but it sounds like it may cause problems. I wonder if it is possible to use NFS as the storage backend and to provide

RE: Advise on High Availability configuration

2004-02-02 Thread Andrew Braithwaite
configuration Andrew Braithwaite wrote: Each slave keeps a heartbeat to the master and in the event of a failure, changes it's master to master2. So how does this bit work? If one master falls over and slaves move to master two, how do you rebuild master one without downtime? Don't the slaves try

RE: Advise on High Availability configuration

2004-02-01 Thread Andrew Braithwaite
Hi, In answer to your questions: - Have any of you seen such a configuration being deployed? No, when we implemented high-availability MySQL servers we used MySQL's inbuilt replication - this has been running here for years now and we have had constant DB availability during that time,

RE: images from MySQL backend used with MS-Access 2000 frontend

2004-02-01 Thread Andrew Braithwaite
I would recommend storing the images on the filesystem and put the information about those images (along with the path to the image) in MySQL. If you plan to have lots of images, implement a nice logical directory structure to keep them in as in my experience linux ext2/3 is fast reading/writing

RE: Multiple values in the host field

2004-02-01 Thread Andrew Braithwaite
Hi, In myuser table, I have something like this: | Php.me.com | database_name | You could use a wildcard like this: | %.me.com | database_name | This would allow any the user to connect from any subdomain on the me.com domain. However it would mean that other servers (e.g. wibble.me.com )

RE: Query problem

2004-02-01 Thread Andrew Braithwaite
Hi, You need: select job,avg(sal) from emp group by 1 order by 2 limit 1; Cheers, Andrew -Original Message- From: Edouard Lauer [mailto:[EMAIL PROTECTED] Sent: Saturday 31 January 2004 19:23 To: [EMAIL PROTECTED] Subject: Query problem Hello, I would like to query the littlest

RE: Slave crashed: error 'The table 'users' is full' on query..

2004-02-01 Thread Andrew Braithwaite
Hi, Whilst you may have space on the box, you may have reached a file size limit on whatever OS you're using (on some linux versions, the max size of a file in 4GB and similar on some windows versions) It may also be a mysql limit on data length. Check the status of your table like this: mysql

RE: 5.0 replication and stored procedure

2004-02-01 Thread Andrew Braithwaite
Hi, 5.0 is sub-alpha at the moment. If you think there is a problem, go to http://bugs.mysql.com/ Cheers, Andrew -Original Message- From: William Au [mailto:[EMAIL PROTECTED] Sent: Friday 30 January 2004 22:35 To: [EMAIL PROTECTED] Subject: 5.0 replication and stored procedure Does

RE: MySQL optimisations for search engine

2004-02-01 Thread Andrew Braithwaite
Hi, Make sure the words.word field is indexed and that the pages.id is an indexed primary key. Cheers, Andrew -Original Message- From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] Sent: Friday 30 January 2004 21:39 To: [EMAIL PROTECTED] Subject: MySQL optimisations for search

RE: Multiple mysql servers with the same datadir

2004-02-01 Thread Andrew Braithwaite
Hi, I think you're getting mixed up between DBD (data base driver) and BDB (BerkeleyDB) but I reckon you mean BDB... I'm not sure if the locking of the page (i.e. the whole table file) is done at the filesystem level or is managed internally by each mysqld instance. If it is managed by each

RE: Read Slaves, and load balancing between them...

2004-01-29 Thread Andrew Braithwaite
Hi, I employ a simple method, I have a 'status' table on the master and have a cron job that updates this table with the current time (now()) every minute. I test all the slaves each minute and if the time in the status table gets too far behind the actual time then it flags a warning to me.

RE: Read Slaves, and load balancing between them...

2004-01-29 Thread Andrew Braithwaite
PROTECTED] Subject: Re: Read Slaves, and load balancing between them... On Thu, Jan 29, 2004 at 03:40:17PM -, Andrew Braithwaite wrote: Hi, I employ a simple method, I have a 'status' table on the master and have a cron job that updates this table with the current time (now()) every minute

RE: 100,000,000 row limit?

2003-12-23 Thread Andrew Braithwaite
I don't believe this. I'm going to write a script to disprove this theory right now.. Cheers, Andrew -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Tuesday 23 December 2003 20:08 To: Andres Montiel; [EMAIL PROTECTED] Subject: Re: 100,000,000 row limit? At 0:57

RE: date and not null

2003-12-21 Thread Andrew Braithwaite
Not sure how the first insert worked - couldn't test it as the create table syntax is not valid - nlandings number and nhours number - not sure how they produced the schema: | nlandings | int(11) | YES | | NULL| | | nhours| double(8,2) | YES | | NULL| | In

RE: Very Slow GROUP BY Query

2003-12-21 Thread Andrew Braithwaite
Well, without investigating it too deeply, if you have: SELECT Realm, COUNT(*) AS CallCount, SUM(AcctSessionTime) AS RealmTime FROM ServiceRADIUSAccounting WHERE AcctStartTime '2003-12-12 16:00:00' AND AcctStopTime '2003-12-12 15:00:00' AND (Realm = 'bwsys.net') GROUP BY Realm If you are using

A series of essays on fulltext searching.

2003-12-19 Thread Andrew Braithwaite
Hi, This isn't MySQL specific, but it's very interesting and I thought people may be interested. http://www.tbray.org/ongoing/When/200x/2003/07/30/OnSearchTOC Cheers, Andrew SQL, Query -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: Avarage monthly import

2003-12-08 Thread Andrew Braithwaite
Are you using MySQL? OK, if you are then first simplify your query: select date_format(dt_imp,'%Y/%m') as date, SUM(imp) from sp group by 1 order by 1 Then add the AVG column which will work ok with the group by : select

RE: Query to emulate what mysqldump does

2003-12-03 Thread Andrew Braithwaite
You could try to use the select into {OUTFILE | DUMPFILE} from tablename where blah=blah... I think you may be able to do select into local outfile from blah Which will put the file on the same server as the MySQL client is running on... Cheers, Andrew -Original Message- From:

RE: mysql disaster recovery

2003-12-03 Thread Andrew Braithwaite
I have had some nasty NFS experiences (especially with the server from which you're mounting the data going down). In my experience (and I'm echoing previous responses now) replication is better. Cheers, Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent:

RE: starting another server

2003-11-06 Thread Andrew Braithwaite
Would I need to create different datadirectories? Yes. See http://www.mysql.com/doc/en/Multiple_servers.html Cheers, Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday 06 November 2003 11:38 To: [EMAIL PROTECTED] Subject: starting another server

Online Tutorials for beginners

2003-10-23 Thread Andrew Braithwaite
Hi, Does anyone know of any good mysql tutorials online that would suit someone who has a computer science degree but knows nothing about MySQL. Pointers will be most welcome. Cheers, Andrew Sql, query -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Auto generate MySQL schema based on a text file?

2003-10-14 Thread Andrew Braithwaite
Hi, Does anyone know of a perl module or other code that can look at a text file (CSV, tab-delim etc..) of data and determine a MySQL table definition from it? The data may or may not have a set of column headers as the first line. I would appreciate it greatly if anyone could give me any

RE: Auto generate MySQL schema based on a text file?

2003-10-14 Thread Andrew Braithwaite
it for use in my app? Would be much appreciated... Cheers, Andrew -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Tuesday 14 October 2003 19:19 To: Andrew Braithwaite; '[EMAIL PROTECTED]' Subject: Re: Auto generate MySQL schema based on a text file? At 19:05 +0100

RE: RAID, miiror OR replication?

2003-10-07 Thread Andrew Braithwaite
Hi, Having implemented all the solutions you suggest, I would need more information to answer this problem. 1. What is the acceptable uptime of the system? 95%, 99%, 99.9%, 99.99% ? 2. In the event of a failure, what is the acceptable recovery time? None, 20 mins, 1 hr, 5 hrs, 1 day ? 3.

RE: [Fwd: MySQL w/dual-master replication?]

2003-10-07 Thread Andrew Braithwaite
Is the system read-heavy or write-heavy? Cheers, Andrew -Original Message- From: Don MacAskill [mailto:[EMAIL PROTECTED] Sent: Monday 06 October 2003 20:47 To: [EMAIL PROTECTED] Subject: [Fwd: MySQL w/dual-master replication?] Hey all, I sent this a few days ago, but it may have

  1   2   >