RE: problem

2011-05-12 Thread Gavin Towey
program is going to be running continuously, there are many other reasons it could lose the connection. Your program should detect the error, and attempt to re-connect. Regards, Gavin Towey -Original Message- From: swaroop jois [mailto:jois_swar...@yahoo.com] Sent: Monday, May 02, 2011 12

RE: Foreign Key Error

2011-02-14 Thread Gavin Towey
" or column types in the table and the referenced table do not match for constraint" The columns Parent and Child are signed integers and ID is unsigned. Regards, Gavin Towey -Original Message- From: Victor Subervi [mailto:victorsube...@gmail.com] Sent: Monday, February 14,

RE: map polygon data for popular us cities

2011-02-02 Thread Gavin Towey
Openstreetmap.org is as close as you'll get. I'd be surprised if they have shapes for cities beyond just lat/lon point data, but they should have shapes data for zips, counties, states and countries if I recall correctly. -Original Message- From: vegiv...@gmail.com [mailto:vegiv...@gmail

RE: Slow query on MySQL4 server doing simple inner join of two InnoDB tables

2011-01-24 Thread Gavin Towey
If you show the EXPLAIN SELECT .. output, and the table structure, someone will be able to give a more definite answer. -Original Message- From: Kendall Gifford [mailto:zettab...@gmail.com] Sent: Monday, January 24, 2011 2:29 PM To: mysql@lists.mysql.com Subject: Re: Slow query on MySQL4

RE: Mysql Event scheduler

2011-01-10 Thread Gavin Towey
1. no 2. yes -Original Message- From: Machiel Richards [mailto:machi...@rdc.co.za] Sent: Monday, January 10, 2011 2:07 AM To: mysql mailing list Subject: Mysql Event scheduler Good day all Can anyone perhaps off hand tell me whether the following two tasks will be able to be sche

RE: This just seems to slow

2011-01-03 Thread Gavin Towey
I much prefer LOAD DATA INFILE to mysqlimport. The issue looks like you have a file with two columns, and a table with three. You will probably need to be more specific about which columns map to which fields in the file. Please report the error with any commands you run. Also, most importan

RE: 4 days to drop Index

2010-12-26 Thread Gavin Towey
o around 6 hours is much more reasonable for your operation. Regards, Gavin Towey -Original Message- From: yueliangdao0...@gmail.com [mailto:yueliangdao0...@gmail.com] On Behalf Of ??? Sent: Thursday, December 23, 2010 11:29 PM To: Adarsh Sharma Cc: mysql@lists.mysql.com Subject: Re:

RE: Bind-address use?

2010-12-07 Thread Gavin Towey
" intermittent connection problems (error 2013)" Look at SHOW PROCESSLIST; when you're having a connection problem. If you see lots of "unathenticated user" in the list, then it means you're having DNS problems. Typically the best way to handle this is to set skip-name-resolve, and using ip

RE: explain shows type = ALL for indexed column

2010-12-07 Thread Gavin Towey
Mysql often handles subqueries poorly. It's best to rewrite that as a JOIN instead: http://dev.mysql.com/doc/refman/5.1/en/rewriting-subqueries.html If you have further questions after doing that, show the table structures, the query, and the explain output. -Original Message- From: A

RE: Another replication question

2010-11-24 Thread Gavin Towey
If you use a chain of masters, you can accomplish the same effect: Master1->Master2->Master->3->Slave However I don't recommend this since the more links you have in a replication chain, the easier it is to break it in a way that's very not-fun to deal with. -Original Message- From: Ro

RE: question about restoring...

2010-11-09 Thread Gavin Towey
Not if he has the raw innodb files. -Original Message- From: Jerry Schwartz [mailto:je...@gii.co.jp] Sent: Tuesday, November 09, 2010 11:05 AM To: Gavin Towey; 'Andy Wallace'; 'mysql list' Subject: RE: question about restoring... That's overkill. You should b

RE: question about restoring...

2010-11-09 Thread Gavin Towey
No, you should import the data into another instance of mysql to extract the records. Regards, Gavin Towey -Original Message- From: Andy Wallace [mailto:awall...@ihouseweb.com] Sent: Tuesday, November 09, 2010 10:34 AM To: mysql list Subject: question about restoring... So, I got a

RE: Running Queries When INSERTing Data?

2010-11-08 Thread Gavin Towey
eal performance, and experiment with optimizations. -Original Message- From: Hal Vaughan [mailto:h...@halblog.com] Sent: Monday, November 08, 2010 10:39 AM To: mysql@lists.mysql.com Subject: Re: Running Queries When INSERTing Data? On Nov 8, 2010, at 1:23 PM, Gavin Towey wrote: > I&

RE: Running Queries When INSERTing Data?

2010-11-08 Thread Gavin Towey
elimited format, you don't need to write a separate parser to insert rows line by line. MySQL has LOAD DATA INFILE which takes delimited text files and inserts data in bulk, which is much faster than inserting line by line. Regards, Gavin Towey -Original Message- From: Hal Vaughan

RE: Innodb can't start

2010-11-02 Thread Gavin Towey
nodb and get your data out. Regards, Gavin Towey -Original Message- From: Julien Jabouin [mailto:chatlumo@gmail.com] Sent: Sunday, October 31, 2010 5:27 AM To: mysql@lists.mysql.com Subject: Innodb can't start Hello, I have a database with tables in innodb and from today database

RE: mySql versus Sql Server performance

2010-10-26 Thread Gavin Towey
ber 25, 2010 2:24 PM To: Gavin Towey; mysql@lists.mysql.com Subject: RE: mySql versus Sql Server performance Here's the innodb stuff - although the largest data set I've used in the stats run is around 20MB, which doesn't seem like much to me. 'innodb_adaptive_hash_index

RE: Load Data Infile Errors

2010-10-25 Thread Gavin Towey
the actual number of rows processed when using REPLACE or IGNORE, see the ROW_COUNT() function: http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_row-count Regards, Gavin Towey -Original Message- From: James W. McKelvey [mailto:james.w.mckel...@jpl.nasa.gov] Sent

RE: mySql versus Sql Server performance

2010-10-25 Thread Gavin Towey
son [mailto:patrick.thomp...@channelintelligence.com] Sent: Monday, October 25, 2010 12:31 PM To: Gavin Towey; mysql@lists.mysql.com Subject: RE: mySql versus Sql Server performance Query: SELECT * FROM Item WHERE CollectionID = 'a0d3937b-f5a8-0640-dec8-bdd60f7f4775' AND Ext

RE: mySql versus Sql Server performance

2010-10-25 Thread Gavin Towey
EATE TABLE \G output for all tables involved, and someone here should be able to help diagnose why the queries might be slow. Regards, Gavin Towey -Original Message- From: Patrick Thompson [mailto:patrick.thomp...@channelintelligence.com] Sent: Monday, October 25, 2010 6:38 AM To: mysq

RE: Federated Tables versus Views

2010-10-08 Thread Gavin Towey
Neither, really. You can qualify a table with the database name to operate on tables in multiple databases on the same host. Federated is a way of accessing a table's data from a remote instance of mysql. -Original Message- From: winterb...@gmail.com [mailto:winterb...@gmail.com] On Be

RE: update and times

2010-10-04 Thread Gavin Towey
Those unix_time values don't seem to correspond to the dates you have. select NOW(), UNIX_TIMESTAMP(NOW()); +-+---+ | NOW() | UNIX_TIMESTAMP(NOW()) | +-+---+ | 2010-10-04 13:18:08 |1286223488

RE: Indexing question

2010-10-04 Thread Gavin Towey
Include the query, EXPLAIN output, and the relavant SHOW CREATE TABLE table \G output. Someone should be able to offer suggestions. -Original Message- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Monday, October 04, 2010 8:54 AM To: Joerg Bruehe Cc: [MySQL] Subject: Re

RE: Indexing question

2010-10-01 Thread Gavin Towey
You can't use an index to select records in a range, and order them. The order by will cause a filesort in that case. Additionally indexes are always read left to right. So an index on ('user_id', 'product_id') will help when doing WHERE user_id=N AND product_id IN (1,2,3), but wouldn't help

RE: Object audit info

2010-10-01 Thread Gavin Towey
Alternatively, if you only want to log modifications, then the binlog would suffice. -Original Message- From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De Meersman Sent: Friday, October 01, 2010 6:21 AM To: PRATIKSHA JAISWAL Cc: mysql@lists.mysql.com Subject: Re:

RE: possible curdate() issue

2010-10-01 Thread Gavin Towey
You're using incorrect syntax for date math. Use: CURDATE() - INTERVAL 1 day See the manual for details. -Original Message- From: Ted Maas [mailto:tm...@uic.edu] Sent: Friday, October 01, 2010 7:47 AM To: mysql@lists.mysql.com Subject: possible curdate() issue This is most likely user

RE: Migrating my mindset from MyISAM to InnoDB

2010-09-28 Thread Gavin Towey
Also note, 5.5 isn't production ready. 5.1 is the current GA release. -Original Message- From: Hank [mailto:hes...@gmail.com] Sent: Tuesday, September 28, 2010 3:29 PM To: mysql@lists.mysql.com Subject: Migrating my mindset from MyISAM to InnoDB Primarily due to many positive posts I've

RE: Migrating my mindset from MyISAM to InnoDB

2010-09-28 Thread Gavin Towey
e. Do something else in the mean time. 3. Yes, innodb table will take more space on disk. If you have a really long primary key, and lots of secondary indexes, then it can take a *lot* more. Disk is cheap, don't worry about it. Regards, Gavin Towey -Original Message- From:

RE: Segmentation fault - Redhat Linux 64 Bit

2010-09-27 Thread Gavin Towey
Either 1. Use strace to find out where it's getting a segfault, or 2. Use gdb and get the backtrace where crashes. -Original Message- From: Sharath Babu Dodda [mailto:sharath.do...@gmail.com] Sent: Monday, September 27, 2010 3:17 PM To: mysql@lists.mysql.com Subject: Segmentation fault -

RE: prime number table

2010-09-17 Thread Gavin Towey
The data isn't in the .frm; That only holds the structure of the table. Your data is in the .MYD file of the same name, and indexes are in the .MYI file. -Original Message- From: Elim PDT [mailto:e...@pdtnetworks.net] Sent: Friday, September 17, 2010 11:29 AM To: mysql@lists.mysql.com S

RE: no success (was: hard disk crash: how to discover the db?)

2010-09-14 Thread Gavin Towey
With PHP, a blank page usually means it's generating an error, but not displaying it in the browser; this is often disabled for security reasons, but makes debugging harder. First step should be to get PHP to spit out the actual error. There should probably be a setting in the mediawiki config

RE: Crashed Table - How to report/prevent?

2010-09-14 Thread Gavin Towey
Innodb doesn't suffer from corruption issues nearly as often as myisam tables, and it is able to recover on its own in many cases (crash recovery.) In my experience, if innodb does get corrupted, it's most often because of hardware problems. You could consider using it instead. -Original M

RE: Performance Tunning

2010-08-31 Thread Gavin Towey
This is a good place to start: https://launchpad.net/mysql-tuning-primer -Original Message- From: Johnny Withers [mailto:joh...@pixelated.net] Sent: Tuesday, August 31, 2010 5:38 AM To: Johan De Meersman Cc: kranthi kiran; mysql@lists.mysql.com Subject: Re: Performance Tunning So, it's n

RE: Fixture List generation using MySQL

2010-08-19 Thread Gavin Towey
in the first column as the "home team." Regards, Gavin Towey -Original Message- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Thursday, August 19, 2010 10:07 AM To: [MySQL] Subject: Re: Fixture List generation using MySQL I'm looking at a routine / script

RE: max_seeks_for_key

2010-08-17 Thread Gavin Towey
It's not really necessary for you to adjust that variable. -Original Message- From: jitendra ranjan [mailto:jitendra_ran...@yahoo.com] Sent: Tuesday, August 17, 2010 7:52 AM To: mysql@lists.mysql.com Subject: max_seeks_for_key Hi, We have myisam tables which has round 10 lakhs of recor

RE: Join Problem

2010-08-16 Thread Gavin Towey
What do you mean by "not working?" What results do you get? -Original Message- From: Victor Subervi [mailto:victorsube...@gmail.com] Sent: Monday, August 16, 2010 6:59 AM To: mysql@lists.mysql.com Subject: Join Problem Hi; I have this code: select f.id from Flights f join Planes p where

RE: opened_table status

2010-08-12 Thread Gavin Towey
You don't need to flush tables, just increase the table_cache. -Original Message- From: jitendra ranjan [mailto:jitendra_ran...@yahoo.com] Sent: Thursday, August 12, 2010 10:55 AM To: mysql@lists.mysql.com Subject: opened_table status Hi, I have opened_table status is too high but i don'

RE: info on mysql

2010-08-09 Thread Gavin Towey
For most of your questions, use: SHOW GLOBAL STATUS; SHOW GLOBAL VARIABLES; (7) Database performance statistics queries (8) Top 5 queries taking more time for executions. (9) Engine information. For these, you need to enable the slow query log, gather queries over a given interval of time, the

RE: Split string by regex

2010-08-03 Thread Gavin Towey
ber | +++ | RA | 100| +++ If this looks ugly, then that should be good motivation not to store multiple pieces of data as concatenated strings =) Regards, Gavin Towey -Original Message- From: Adam Gray [mailto:acg...@me.com] Sent: Tuesday, Aug

RE: Yet another query question

2010-07-26 Thread Gavin Towey
You'll need to use the technique described here: http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html -Original Message- From: Michael Stroh [mailto:st...@astroh.org] Sent: Monday, July 26, 2010 2:50 PM To: MySql Subject: Yet another query question Hi everyone and

RE: which version is better for production servers?

2010-07-19 Thread Gavin Towey
No, current GA is 5.1.48 -Original Message- From: Nilnandan Joshi [mailto:nilnand...@synechron.com] Sent: Monday, July 19, 2010 6:14 AM To: Andrés Tello Cc: mysql@lists.mysql.com Subject: Re: which version is better for production servers? But, can we get GA releases for MySQL 5.5? André

RE: Myisam advantages

2010-07-19 Thread Gavin Towey
In addition, the binlogs function as incremental backups. With a full backup + binlogs, you can do point-in-time recovery to any moment you choose. -Original Message- From: Keith Murphy [mailto:bmur...@paragon-cs.com] Sent: Monday, July 19, 2010 6:55 AM To: Jan Steinman Cc: mysql@lists.my

RE: Mysql 4 and or Partitions.

2010-07-15 Thread Gavin Towey
Use indexes before thinking about partitions. -Original Message- From: Andrés Tello [mailto:mr.crip...@gmail.com] Sent: Thursday, July 15, 2010 8:44 AM To: mysql Subject: Mysql 4 and or Partitions. Ok... I solved my mistery of the slow 22G table rebuild the kernel to support memory an

RE: Allowing Connections From Remote Clients

2010-07-13 Thread Gavin Towey
The text of the error message means that this is not a possible cause; the error message given is coming from the mysql server itself after failed authentication -- in this case there's no matching u...@host combination. -Original Message- From: Michael Satterwhite [mailto:mich...@weblo

RE: query help

2010-06-15 Thread Gavin Towey
don't have a match is your answer. Regards, Gavin Towey -Original Message- From: Richard Reina [mailto:rich...@rushlogistics.com] Sent: Tuesday, June 15, 2010 11:30 AM To: mysql@lists.mysql.com Subject: query help I have a table similar to this: - |tr

RE: MySQL For Huge Collections

2010-06-11 Thread Gavin Towey
o, in terms of requirements, 300k books doesn't say a lot. Looking at project Gutenberg, I see that an uncompressed text copy of Sherlock Holmes is only 500k, so you're talking about maybe 150G of data -- which is pretty moderate. Sounds like a fun project though, good luck! Regar

RE: Fancy partitioning scheme

2010-06-02 Thread Gavin Towey
It really depends on your queries and access patterns. Why not use mysql datetime or timestamp type? Storing unix timestamps as int means you're going to have to convert values to use mysql's date functions. Regards, Gavin Towey -Original Message- From: Bryan Cantwell [mai

RE: Slow query using string functions

2010-05-26 Thread Gavin Towey
Jerry, Are you sure this is really your explain plan for this query? That's not at all what I would expect to see. Regards, Gavin Towey -Original Message- From: Jerry Schwartz [mailto:je...@gii.co.jp] Sent: Wednesday, May 26, 2010 2:14 PM To: mysql@lists.mysql.com Subject: Slow

RE: Can't create foreign key

2010-05-14 Thread Gavin Towey
Perror 121 says: OS error code 121: Remote I/O error Which I'm not too sure why an ALTER to add an constraint would give that error. Normally though, foreign key errors are shown in the SHOW ENGINE INNODB STATUS \G output, look for more details there. Regards, Gavin Towey -Ori

RE: order by numeric value

2010-04-27 Thread Gavin Towey
+ | CAST(REPLACE('$1.00','$','') as decimal(8,2)) | +---+ | 1.00 | +---+ 1 row in set (0.00 sec) Which in that case, it's better to just select balance without the dollar sign and ord

RE: better way to backup 50 Gig db?

2010-04-21 Thread Gavin Towey
both for backup, and creating new slaves. It always works. Neither of those links you gave contradict this, in fact they both essentially say "this works great, as long as you're aware of the caveats" Regards, Gavin Towey -Original Message- From: Claudio Nanni [mailto

RE: Getting Array to display on SELECT

2010-04-20 Thread Gavin Towey
This is a PHP question. -Original Message- From: Gary [mailto:g...@paulgdesigns.com] Sent: Tuesday, April 20, 2010 3:17 PM To: mysql@lists.mysql.com Subject: Getting Array to display on SELECT I'm frankly not sure if this is a MySQL question or PHP, but I thought I would start here. I ha

RE: better way to backup 50 Gig db?

2010-04-20 Thread Gavin Towey
You can make binary backups from the master using filesystem snapshots. You only need to hold a global read lock for a split second. Regards, Gavin Towey From: Claudio Nanni [mailto:claudio.na...@gmail.com] Sent: Tuesday, April 20, 2010 1:19 PM To: Gavin Towey Cc: andrew.2.mo...@nokia.com; li

RE: better way to backup 50 Gig db?

2010-04-20 Thread Gavin Towey
slave should be treated as a somewhat unreliable copy of your data. Regards, Gavin Towey -Original Message- From: andrew.2.mo...@nokia.com [mailto:andrew.2.mo...@nokia.com] Sent: Tuesday, April 20, 2010 2:08 AM To: li...@netrogenic.com Cc: mysql@lists.mysql.com Subject: RE: better way to b

RE: better way to backup 50 Gig db?

2010-04-19 Thread Gavin Towey
What Shawn said is important. Better options: 1. Use InnoDB, and then you can make a consistent backup with `mysqldump --single-transaction > backup.sql` and keep your db server actively responding to requests at the same time. 2. Use something like LVM to create filesytem snapshots which allo

RE: Slow Union Statement

2010-04-05 Thread Gavin Towey
Union does a distinct on all results. UNION ALL will avoid that. Regards, Gavin Towey -Original Message- From: chen.1...@gmail.com [mailto:chen.1...@gmail.com] On Behalf Of chen jia Sent: Monday, April 05, 2010 11:07 AM To: mysql@lists.mysql.com Subject: Slow Union Statement Hi there

RE: MyISAM better than innodb for large files?

2010-04-02 Thread Gavin Towey
ers and writers grows, the improvement in performance from using innodb over myisam becomes more pronounced. Regards, Gavin Towey -Original Message- From: Carsten Pedersen [mailto:cars...@bitbybit.dk] Sent: Friday, April 02, 2010 12:58 PM To: Mitchell Maltenfort Cc: mysql@lists.mysql.

RE: Table Length Question...

2010-03-30 Thread Gavin Towey
http://mysqldump.azundris.com/archives/20-Nermalisation.html and some here http://www.keithjbrown.co.uk/vworks/mysql/ Good luck! Regards, Gavin Towey -Original Message- From: Steven Staples [mailto:sstap...@mnsi.net] Sent: Tuesday, March 30, 2010 8:36 AM To: mysql@lists.mysql.com Subject

RE: Best Configuration on Production Server

2010-03-19 Thread Gavin Towey
What changed between your test that took 5ms and the current production system? -Original Message- From: Abdul Mohid Khan [mailto:abdulmohid.k...@magnaquest.com] Sent: Friday, March 19, 2010 12:27 AM To: mysql@lists.mysql.com Cc: Abdul Mohid Khan Subject: Best Configuration on Production S

RE: udf return column name not value

2010-03-15 Thread Gavin Towey
You'll have to do something like this: SET @sql := CONCAT('select ',columnname,' into retval from user where ID=',id); PREPARE mySt FROM @sql; EXECUTE mySt; -Original Message- From: chamila gayan [mailto:cgcham...@gmail.com] Sent: Monday, March 15, 2010 12:58 AM To: mysql@lists.mysql.co

RE: Nested inserts possible?

2010-03-12 Thread Gavin Towey
If you're inserting multiple rows in the dependent table for the same id in the parent table, you'll need to save the value of LAST_INSERT_ID(), otherwise subsequent inserts will change it! INSERT INTO parent VALUES (...); SET @id:=LAST_INSERT_ID(); INSERT INTO child1 VALUES (@id, ... ); INSERT

RE: Properly ALTER Column Data?

2010-03-11 Thread Gavin Towey
Please read the tutorial, let us know if you have questions on the information in it: http://dev.mysql.com/doc/refman/5.0/en/tutorial.html -Original Message- From: Carlos Mennens [mailto:carlosw...@gmail.com] Sent: Thursday, March 11, 2010 12:44 PM To: MySQL Subject: Properly ALTER Colu

RE: Error Removing Anonymous Accounts

2010-03-11 Thread Gavin Towey
DROP USER ''@'localhost'; If you use the correct GRANT/REVOKE and CREATE/DROP commands it's not necessary to update the tables and run FLUSH PRIVILEGES. IMO manipulating those tables directly is a bad habit. -Original Message- From: Carlos Mennens [mailto:carlosw...@gmail.com] Sent: T

RE: Front End Application For MySQL

2010-03-09 Thread Gavin Towey
Google for "hardware asset management software" -Original Message- From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De Meersman Sent: Tuesday, March 09, 2010 9:15 AM To: Carlos Mennens Cc: MySQL Subject: Re: Front End Application For MySQL Wrong place to ask, unle

RE: UDF - Sequence Numbers

2010-03-08 Thread Gavin Towey
set nextid=LAST_INSERT_ID(nextid+1) where store_id=1; select LAST_INSERT_ID(); This will give you the next id in an atomic way, and avoid replication problems. It means your insert will take two queries, but that's a small price to pay for correctness. Regards, Gavin Towey -Original Message---

RE: Displaying date/time

2010-03-05 Thread Gavin Towey
That's probably something best done in your presentation (app) layer. If you must do this in mysql, then you'll probably want to write a stored function. -Original Message- From: Tompkins Neil [mailto:neil.tompk...@googlemail.com] Sent: Friday, March 05, 2010 10:27 AM To: prabhat kumar C

RE: Re bug#45458

2010-03-03 Thread Gavin Towey
Yes, but the optimizer doesn't know that. -Original Message- From: vegiv...@gmail.com [mailto:vegiv...@gmail.com] On Behalf Of Johan De Meersman Sent: Wednesday, March 03, 2010 6:16 AM To: Zardosht Kasheff Cc: Jonas Oreland; mysql@lists.mysql.com Subject: Re: Re bug#45458 Unless I'm very

RE: auto_increment weirdness

2010-02-18 Thread Gavin Towey
Reproduced in 5.1.43. Could not reproduce it in 5.0.66 -Original Message- From: Yang Zhang [mailto:yanghates...@gmail.com] Sent: Wednesday, February 17, 2010 6:05 PM To: mysql@lists.mysql.com Subject: auto_increment weirdness Hi, for some reason, I have an auto_increment field that's ma

RE: count children nodes

2010-02-16 Thread Gavin Towey
Trees can be complex in SQL; these articles will give some different ideas to handle it: http://hashmysql.org/index.php?title=Trees_and_hierarchical_data_in_SQL http://dev.mysql.com/tech-resources/articles/hierarchical-data.htm Regards, Gavin Towey -Original Message- From: David Arroyo

RE: Mysql crashes, do not understand backtrace

2010-02-15 Thread Gavin Towey
tablespace and log file, restart mysql in a "clean" state, then re-import your data. Please proceede with caution though; if possible make a backup of the mysql data directory in its current corrupted state before you delete anything. Regards Gavin Towey -Original Message- From: We

RE: query help

2010-02-09 Thread Gavin Towey
SELECT ID, check_no, amount FROM payables UNION SELECT ID, check_no, amount FROM paychecks; Regards, Gavin Towey -Original Message- From: Richard Reina [mailto:rich...@rushlogistics.com] Sent: Tuesday, February 09, 2010 9:23 AM To: mysql@lists.mysql.com Subject: query help I am trying

RE: Converting MyISAM to InnoDB

2010-02-08 Thread Gavin Towey
ssage. Regards, Gavin Towey -Original Message- From: Steve Staples [mailto:sstap...@mnsi.net] Sent: Monday, February 08, 2010 9:39 AM To: mysql@lists.mysql.com Subject: Converting MyISAM to InnoDB Hello again! I am trying to convert my tables to InnoDB, and i am getting an error... Error:

RE: Business Key Generation

2010-02-05 Thread Gavin Towey
Your auto-increment could be effectively a row number. Otherwise there is this technique with user variables: SET @rownum := 0; SELECT @rownum:=...@rownum+1 as ROWNUM, ... FROM ... ; Regards, Gavin Towey -Original Message- From: Tom Goring [mailto:tom.gor...@gmail.com] Sent: Friday

RE: When using "FOR UPDATE" whole the table seems to lock instead of selected row

2010-01-18 Thread Gavin Towey
I think Baron was referring to a technique like this: you sell a t-shirt, UPDATE table SET t=t-X WHERE t >= X, if you get rows affected, it's sold and ok. if not, the stock ran out before the operation. but it's safe. see http://dev.mysql.com/tech-resources/articles/storage-engine/part_3.html

RE: Regarding storing non-english chars in mysql

2010-01-18 Thread Gavin Towey
http://dev.mysql.com/doc/refman/5.0/en/charset.html -Original Message- From: Ningappa Koneri [mailto:ningappa.kon...@comviva.com] Sent: Sunday, January 17, 2010 11:32 PM To: mysql@lists.mysql.com Subject: Regarding storing non-english chars in mysql Dear all, I have a problem in migrati

RE: Binary Logging

2010-01-06 Thread Gavin Towey
data from the master; with a fast network that can be seconds. You can also use FLUSH LOGS; to force mysql to start a new binlog file, then purge all files before the most current one. Regards, Gavin Towey -Original Message- From: Steve Staples [mailto:sstap...@mnsi.net] Sent: Wednesday, Ja

RE: MySQL db died / got corrupted / ???

2010-01-04 Thread Gavin Towey
/forcing-recovery.html Make sure to make backups, even of your corrupted data. You might want to check your hardware, it could be faulty. Good luck! Regards, Gavin Towey -Original Message- From: John Oliver [mailto:joli...@john-oliver.net] Sent: Monday, January 04, 2010 4:47 PM To

RE: Weeks

2009-12-28 Thread Gavin Towey
indexes to find your query results. Regards, Gavin Towey -Original Message- From: ML [mailto:mailingli...@mailnewsrss.com] Sent: Monday, December 28, 2009 4:15 PM To: mysql@lists.mysql.com Subject: Weeks Hi All, trying to write some SQL that will give me records for the CURRENT WEEK

RE: Why does this query take so long?

2009-12-28 Thread Gavin Towey
It sounds like your laptop might be paging mysql's memory to disk or something like that. Your laptop may not be the most reliable source for benchmarks. Regards, Gavin Towey -Original Message- From: René Fournier [mailto:m...@renefournier.com] Sent: Monday, December 28, 2009 2:

RE: Is there a better way than this?

2009-12-28 Thread Gavin Towey
nd 2. You need to use aggregates to create conditions that are meaningful for all x with the same value: SELECT x FROM a GROUP BY x HAVING sum(y=25) and not sum(y=24); Regards, Gavin Towey -Original Message- From: Chris W [mailto:4rfv...@cox.net] Sent: Sunday, December 27, 2009 6:02 PM To:

RE: Spatial extensions

2009-12-21 Thread Gavin Towey
ordinates); You can check the data with the ASTEXT() function: SELECT longitude, latitude, ASTEXT(coordinates) FROM places; Hope this helps -Gavin Towey From: René Fournier [mailto:m...@renefournier.com] Sent: Saturday, December 19, 2009 12:42 AM To: Gavin Towey Cc: mysql Subject: Re: Spatial e

RE: Spatial extensions

2009-12-17 Thread Gavin Towey
couple occurances of "line_segment" to "coordinates" line_segment was just the column name I was using in my original query. Regards, Gavin Towey -Original Message- From: René Fournier [mailto:m...@renefournier.com] Sent: Thursday, December 17, 2009 8:54 AM To: Gavin Towey C

RE: Importing large databases faster

2009-12-16 Thread Gavin Towey
I don't think so, I'm pretty sure you have to use mk-parallel-dump to get the data in a format it wants. The docs are online though. Regards, Gavin Towey -Original Message- From: Madison Kelly [mailto:li...@alteeve.com] Sent: Wednesday, December 16, 2009 4:35 PM To: Gavi

RE: Spatial extensions

2009-12-16 Thread Gavin Towey
') ); select id, astext(coordinates), Distance(@center,line_segment) as dist FROM places where MBRContains(@bbox, line_segment) order by dist limit 10; Regards, Gavin Towey -Original Message- From: René Fournier [mailto:m...@renefournier.com] Sent: Wednesday, December 16, 2009 4:32 PM To:

RE: Importing large databases faster

2009-12-16 Thread Gavin Towey
ng as it takes for you to scp the database from one machine to another. Regards, Gavin Towey -Original Message- From: Madison Kelly [mailto:li...@alteeve.com] Sent: Wednesday, December 16, 2009 12:56 PM To: mysql@lists.mysql.com Subject: Importing large databases faster Hi all, I&

RE: Cannot created stored procedure (Using example from mysql manual) -- mysql 5.1.37 -- Ubuntu 9.10

2009-12-16 Thread Gavin Towey
You need to use DELIMITER // Or some other symbol besides ; to change the client's end-of-statement symbol. Otherwise it ends the statement at the first ; inside the procedure you use, but it's not yet complete. This is described in the manual on that same page. Regards G

RE: Count records in join

2009-12-15 Thread Gavin Towey
Hi Miguel, You'll need to use LEFT JOIN, that will show all records that match and a row in the second table will all values NULL where there is no match. Then you find all those rows that have no match in your WHERE clause. Regards, Gavin Towey -Original Message- From: Migue

RE: Optimization suggestions

2009-12-14 Thread Gavin Towey
om/doc/refman/5.0/en/explain.html http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html About normalization: http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html Regards, Gavin Towey -Original Message- From: Sudhir N [mailto:sudhir_nima...@yahoo.com] Sent: Monda

RE: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Gavin Towey
Don't forget triggers, stored routines, views, database/table specific user permissions, and replication/binlog options! Regards, Gavin Towey -Original Message- From: Saravanan [mailto:suzuki_b...@yahoo.com] Sent: Friday, December 11, 2009 2:02 PM To: MySql; Michael Dykman Subjec

RE: errno: 13

2009-12-11 Thread Gavin Towey
Mysql daemon runs as the 'mysql' user Chown -r mysql:mysql /storage/mysql/data Regards, Gavin Towey -Original Message- From: Carl [mailto:c...@etrak-plus.com] Sent: Friday, December 11, 2009 11:55 AM To: mysql@lists.mysql.com Subject: errno: 13 Fresh install of 5.1.41 on a

RE: stored procedure and random table name -> temp table, merge, prepared statement

2009-12-10 Thread Gavin Towey
Creating a temporary merge table works fine for me on 5.0. Your table isn't innodb is it? That will fail with an error like you're getting. Regards, Gavin Towey -Original Message- From: Dante Lorenso [mailto:da...@lorenso.com] Sent: Thursday, December 10, 2009 3:20 PM

RE: login problem from django script, using python2.5/MySQLdb/connections.py

2009-12-09 Thread Gavin Towey
Access Denied means you're using an incorrect username and password combination. Test your credentials using the mysql cli. You can log in as root to mysql to make changes as necessary, or supply the correct user/pass from your script. Regards, Gavin Towey -Original Message-

RE: Here's an Idea for Re-Syncing Master and Slave During Production Hours without Interrupting Users (Much)

2009-12-04 Thread Gavin Towey
---Original Message- From: Robinson, Eric [mailto:eric.robin...@psmnv.com] Sent: Friday, December 04, 2009 1:24 PM To: Gavin Towey; Tom Worster; mysql@lists.mysql.com Subject: RE: Here's an Idea for Re-Syncing Master and Slave During Production Hours without Interrupting Users (Much) > I

RE: Here's an Idea for Re-Syncing Master and Slave During Production Hours without Interrupting Users (Much)

2009-12-04 Thread Gavin Towey
ween servers, and can fix them with queries. No stopping the slave or locking the master necessary. I've used them in production with good results. Regards, Gavin Towey -Original Message- From: Robinson, Eric [mailto:eric.robin...@psmnv.com] Sent: Friday, December 04, 2009

RE: Creating Table Through Union

2009-11-22 Thread Gavin Towey
, Gavin Towey -Original Message- From: Victor Subervi [mailto:victorsube...@gmail.com] Sent: Sunday, November 22, 2009 10:56 AM To: mysql@lists.mysql.com Subject: Creating Table Through Union Hi; I would like to create a table out of merging the fields in other, previously created tables. I

RE: Strange problem with mysqldump / automysqlbackup (ERROR 1300)

2009-11-20 Thread Gavin Towey
Have you tried dumping that table manually using mysqldump on the command line to confirm it's not an issue with automysqlbackup? Regards, Gavin Towey -Original Message- From: René Fournier [mailto:m...@renefournier.com] Sent: Friday, November 20, 2009 8:31 AM To: mysql Subject: St

RE: DELETE DATA FROM TABLE

2009-11-19 Thread Gavin Towey
Hi Krishna, Drop partition should be very quick - much faster than doing a DELETE on the same amount of data. Internally, it will be the same as doing a drop table for that partition. Regards, Gavin Towey From: Krishna Chandra Prajapati [mailto:prajapat...@gmail.com] Sent: Thursday, November

RE: DELETE DATA FROM TABLE

2009-11-19 Thread Gavin Towey
your data, shutdown mysql, change you're my.cnf & delete the tablespace & ib_log files, then restart and re-import all your data. If you need to do this, you should probably seek a bit more information about from this list or other sources. Regards, Gavin Towey -Original Mes

RE: Selecting data from multiple tables

2009-11-15 Thread Gavin Towey
ame != 'dopey' where Table_1.username != 'dopey'; Regards, Gavin Towey -Original Message- From: Ashley M. Kirchner [mailto:kira...@gmail.com] Sent: Sunday, November 15, 2009 4:38 AM To: mysql@lists.mysql.com Subject: Selecting data from multiple tables Hi folks, I'

RE: cannot find my.cnf file

2009-11-13 Thread Gavin Towey
27;re using to try to log in, and the exact error message you get. Regards Gavin Towey -Original Message- From: Sydney Puente [mailto:sydneypue...@yahoo.com] Sent: Friday, November 13, 2009 5:31 AM To: mysql@lists.mysql.com Subject: Re: cannot find my.cnf file Yes I enter the password man

RE: cannot find my.cnf file

2009-11-12 Thread Gavin Towey
e you a list of paths it checks in order. Regards, Gavin Towey -Original Message- From: John Daisley [mailto:john.dais...@butterflysystems.co.uk] Sent: Thursday, November 12, 2009 10:30 AM To: Sydney Puente Cc: mysql@lists.mysql.com Subject: Re: cannot find my.cnf file should be in /etc

  1   2   3   >