RE: Speeding Up Process

2007-10-04 Thread Rhys Campbell
"For Each" is always best avoided, think set based! Might be better if you could forward your SQL. Rhys -Original Message- From: Neil Tompkins [mailto:[EMAIL PROTECTED] Sent: 04 October 2007 12:19 To: My SQL Subject: Speeding Up Process Hi I've the following process/queries which I wa

RE: PROBLEM

2007-09-13 Thread Rhys Campbell
Not quite what you're after but you might like to use... http://dev.mysql.com/doc/refman/5.0/en/safe-updates.html -Original Message- From: Krishna Chandra Prajapati [mailto:[EMAIL PROTECTED] Sent: 13 September 2007 15:30 To: MySql Subject: PROBLEM Hi All, There are many user accessing

RE: Column type suggestions

2007-08-24 Thread Rhys Campbell
SELECT * FROM tablename PROCEDURE ANALYSE() Anyone know of a way to get the size of a row in bytes? -Original Message- From: Benjamin Wiechman [mailto:[EMAIL PROTECTED] Sent: 24 August 2007 16:18 To: mysql@lists.mysql.com Subject: Column type suggestions I recall there is a command tha

RE: Why is the average of an int column returned as a string

2007-08-23 Thread Rhys Campbell
I'd guess this may be a funny related to Crystal Reports as I don't recall experiencing this myself. Rhys -Original Message- From: Eric Lommatsch [mailto:[EMAIL PROTECTED] Sent: 22 August 2007 22:21 To: Rhys Campbell; mysql@lists.mysql.com Subject: RE: Why is the average of an

RE: Why is the average of an int column returned as a string

2007-08-22 Thread Rhys Campbell
You could use the CAST function, although I have just discovered that MySQL is rather limited in the types you are able to CAST to... http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html -Original Message- From: Eric Lommatsch [mailto:[EMAIL PROTECTED] Sent: 21 August 2007 22:52 To:

RE: Problem with a complex query

2007-08-15 Thread Rhys Campbell
Does the other user_id have a lot of messages. I think MySQL will choose to table ignore the index if the retrieved rows are above 30% of the table total. Have you tried FORCE INDEX? -Original Message- From: Hugo Ferreira da Silva [mailto:[EMAIL PROTECTED] Sent: 15 August 2007 13:35 To: m

RE: Problem with a complex query

2007-08-15 Thread Rhys Campbell
I solved a similar problem with a messaging system that was very slow because it was doing full table scan each time the query ran. I didn't have the chance to change the schema so this is what I came up with... SET @var = (SELECT MAX(message_id) FROM messages); SELECT columns... FROM message WH

RE: Problem with a complex query

2007-08-14 Thread Rhys Campbell
Struggling with the Portuguese here but... What kind of indexes do you have in place? Are the y appropriate? I have had some success with removed or clauses from queries, creating a new query and join them with a UNION ALL. -Original Message- From: Hugo Ferreira da Silva [mailto:[EMAIL

RE: quickly copying a database

2007-07-18 Thread Rhys Campbell
InnoDB HotBackup but it costs money. http://www.innodb.com/hot-backup -Original Message- From: Ofer Inbar [mailto:[EMAIL PROTECTED] Sent: 18 July 2007 00:12 To: mysql@lists.mysql.com Subject: quickly copying a database I've got a server with a database that's about 10G. I need several

RE: load data

2007-07-11 Thread Rhys Campbell
Can you not change your proceedure and format your dates first using DAT_FORMAT()? http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function _date-format You could put a trigger on the table that would format the dates before insert (although I'd go for the above) -Original

RE: BUG in UNION implementation?! Confimation or Explaination please

2007-07-11 Thread Rhys Campbell
UNION is mean to removed duplicate rows. Use "UNION ALL" if you don't want this to happen. http://dev.mysql.com/doc/refman/5.0/en/union.html -Original Message- From: list account [mailto:[EMAIL PROTECTED] Sent: 11 July 2007 09:19 To: mysql@lists.mysql.com Subject: BUG in UNION implementat

RE: Create Table Warning

2007-06-13 Thread Rhys Campbell
Do a "SHOW WARNINGS" at the command line. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 13 June 2007 16:11 To: mysql@lists.mysql.com Subject: Create Table Warning This is a create table statement output from mysqldump from a 4.0.24 installation. Restoring

RE: Find and Add Unmatched Records

2007-06-01 Thread Rhys Campbell
The "REPLACE" staement might work for you... http://dev.mysql.com/doc/refman/4.1/en/replace.html... -Original Message- From: Kebbel, John [mailto:[EMAIL PROTECTED] Sent: 01 June 2007 15:31 To: mysql@lists.mysql.com Subject: Find and Add Unmatched Records I have a table of middle schoo

RE: Integrity on large sites

2007-05-25 Thread Rhys Campbell
In my experience this happens a lot if you put application programmers in charge of the database. I've upset quite a few in my time by introducing RI and then their horribly coded application falls over! -Original Message- From: Peter Brawley [mailto:[EMAIL PROTECTED] Sent: 24 May 2007 17: