sql command for exporting database

2006-01-13 Thread tony vong
Hi Is there any sql commands for dumping/exporing the content of a database to a file ?? Thanks. Tony. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- MySQL General Mailing List For list

installing mysql in a chroot jail.

2006-01-13 Thread Gregory Machin
Hi I have fc4 and would like to install / upgrade to mysql 5. When i try via yum using fedore-devel.repo it wants to update most of my system because of dependencies So I though why not install mysql5 in a charoot jail thus leaving my os intacted and allowing me to do testing on both version

Re: Query optimization

2006-01-13 Thread Joerg Bruehe
Hi Tripp, all! Tripp Bishop wrote: [[...]] Why would adding extra fields to the query slow the query down so much? In either case it looks like it's using the same index. If a query is to return only fields contained in the index, it can be executed as an index-only query, and the true

RE: sql command for exporting database

2006-01-13 Thread Martijn van den Burg
Tony, Hi Is there any sql commands for dumping/exporing the content of a database to a file ?? Thanks. Tony. SELECT ... INTO OUTFILE (http://dev.mysql.com/doc/refman/5.0/en/select.html), but that doesn't dump the entire database. From the commandline (i.e. it's not an SQL statement) you can

innodb select

2006-01-13 Thread George Law
Hi All, I just had a question on selects on a innodb table. Looking on google, I find that there are different types of selects: select IN SHARE MODE and FOR UPDATE I am administering a database with a fairly large innodb table. I am running into problems with one of my users insisting

Relication from multiple databases

2006-01-13 Thread Jeff
Anyone know if it's possible to do replication from more than one database? Example: System A: Database 1 System B: Database 2 System C: Replication of SYSA:DB1, Replication SYSB:DB2 Thanks, Jeff -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Histogram from tables.

2006-01-13 Thread Mike Martin
I have a large table of filenames and creation dates from which I want to produce a histogram. SELECT year(date), quarter(date), count(0) FROM pics WHERE date(date) '2000' AND date(date) ' 2005' GROUP BY year(date), quarter(date) Gets me close, but to simplify plotting, I want to include

Re: Histogram from tables.

2006-01-13 Thread Gary Richardson
I would typically do this in code, but you could also create a stored procedure that does something like: - create a temporary table - populate it with all possible values with a count field set to 0 - run an REPLACE INTO temp_table your query goes here - dump the contents of the temp table You

Re: Histogram from tables.

2006-01-13 Thread Peter Brawley
Mike, I have a large table of filenames and creation dates from which I want to produce a histogram. SELECT year(date), quarter(date), count(0) FROM pics WHERE date(date) '2000' AND date(date) ' 2005' GROUP BY year(date), quarter(date) Gets me close, but to simplify plotting, I want

Re: Histogram from tables.

2006-01-13 Thread Pooly
Hi, 2006/1/13, Mike Martin [EMAIL PROTECTED]: I have a large table of filenames and creation dates from which I want to produce a histogram. SELECT year(date), quarter(date), count(0) FROM pics WHERE date(date) '2000' AND date(date) ' 2005' GROUP BY year(date), quarter(date) [snip] I

Migration of DB from MySQL 4.0.20 to 4.0.24

2006-01-13 Thread cybermalandro cybermalandro
I have a dump from a database in a FreeBSD box with MySQL version 4.0.20 and I am trying to import this dump to a mysql DB server which runs gentoo and a MySQL version of 4.0.24 but when I tried to do mysql dbname dbname.mysql I get this error: ERROR 1060 at line 574: Duplicate column name

Re: Histogram from tables.

2006-01-13 Thread Wolfram Kraus
Mike Martin wrote: I have a large table of filenames and creation dates from which I want to produce a histogram. SELECT year(date), quarter(date), count(0) FROM pics WHERE date(date) '2000' AND date(date) ' 2005' GROUP BY year(date), quarter(date) Gets me close, but to simplify

Re: Histogram from tables.

2006-01-13 Thread SGreen
[EMAIL PROTECTED] wrote on 01/13/2006 10:16:44 AM: I have a large table of filenames and creation dates from which I want to produce a histogram. SELECT year(date), quarter(date), count(0) FROM pics WHERE date(date) '2000' AND date(date) ' 2005' GROUP BY year(date), quarter(date)

Mysql Query Optimization?

2006-01-13 Thread Scott Baker
I have a query that's taking about 0.3 seconds to run and it should be faster I think. I've read all about query optimization and forcing indexes and I'm not entirely sure what I'm having this problem. Google finds all kinds of basic information like using indexes, and not doing math on the query

Huge number of tables with InnoDB

2006-01-13 Thread John McCaskey
Hi everyone, I'm running MySQL 4.0.18 on Debian with a 2.6 linux kernel using ext3 as the underlying filesystem for the database storage. I currently have some InnoDB tables with the following structure: Log_20060101 { Monitor_id medium int, Timestamp

Re: Huge number of tables with InnoDB

2006-01-13 Thread Alec . Cawley
To reply to this, I think we have to understand why you have chosen to split the tables at all. It seems to me that this, by introducing a two-level lookup, is certain to be slower than any possible single table lookup. Generally, Log A + log B is bound to be larger than log (A*B). It appears

RE: Huge number of tables with InnoDB

2006-01-13 Thread John McCaskey
Alec, Thanks for your response; however, I'm not convinced you are correct :) Let me try to explain in more detail my reasoning below. Why should the two level lookup be Log A + Log B? Looking up a tablename is always an equilvalency check, not a range check. So there is no advantage to having

Re: Huge number of tables with InnoDB

2006-01-13 Thread Peter Brawley
Alec writes ...Generally, Log A + log B is bound to be larger than log (A*B)... Errm, log A + log B exactly = log(A*B) :-) . PB - [EMAIL PROTECTED] wrote: To reply to this, I think we have to understand why you have chosen to split the tables at all. It seems to me that this, by

Specifying the location of a database

2006-01-13 Thread Beau E. Cox
Hi - I want to specify the location of a specific database to balance my disk usage. I remember doing this several years ago for a job, but my memory fails me. I can't find anything in the docs ( I am using 5.1 ). I don't see anything in 'create database'. -- Aloha = Beau; -- MySQL General

Performance tuning...

2006-01-13 Thread Sebastien Roy
Hey guys, I'm trying to optimize our database server machine. Currently we have 5 mysql daemon running that serves between 5-20 DB each. Is it better for me to have only one mysql daemon running with all the DB ? And I will need some tips to fine tune the server it self also. It's running

Re: Specifying the location of a database

2006-01-13 Thread Gleb Paharenko
Hello. Usually for this purposes symbolic links are used: http://dev.mysql.com/doc/refman/5.1/en/symbolic-links.html For load balancing you may want to use partitioning as well: http://dev.mysql.com/doc/refman/5.1/en/partitioning.html Beau E. Cox wrote: Hi - I want to specify the

Re: Mysql Query Optimization?

2006-01-13 Thread Gleb Paharenko
Hello. Please, provide the output of EXPLAIN for your queries. The performance should improved if you make e.CustID and c.CustID the same type (one of them is unsigned). Have you run ANALYZE TABLE on your tables? Scott Baker wrote: I have a query that's taking about 0.3 seconds to run and it

Re: Migration of DB from MySQL 4.0.20 to 4.0.24

2006-01-13 Thread Gleb Paharenko
Hello. Please, provide the peace of the dbname.mysql file with lines around 574 line. cybermalandro cybermalandro wrote: I have a dump from a database in a FreeBSD box with MySQL version 4.0.20 and I am trying to import this dump to a mysql DB server which runs gentoo and a MySQL version of

Re: Relication from multiple databases

2006-01-13 Thread Atle Veka
No, unfortunately you cannot have multiple masters on a single replication slave. You can however have multiple daemons running on system (C) via mysqld_multi. Atle - Flying Crocodile Inc, Unix Systems Administrator On Fri, 13 Jan 2006, Jeff wrote: Anyone know if it's possible to do

Re: Relication from multiple databases

2006-01-13 Thread Gleb Paharenko
Hello. MySQL allows to have only one master for replication. But if it is possible in your production environment, you can replicate from A to B (database names can be rewritten with replicate-rewrite-db), and replicate the whole stuff to C. I agree, this is not an ideal workaround,but hope this

Re: installing mysql in a chroot jail.

2006-01-13 Thread Gleb Paharenko
Hello. Search in archives at http://lists.mysql.com/mysql. There is at least one interesting for you thread: http://lists.mysql.com/mysql/192066 Gregory Machin wrote: Hi I have fc4 and would like to install / upgrade to mysql 5. When i try via yum using fedore-devel.repo it wants to update

FC4 binaries and mysql 5.0

2006-01-13 Thread Brett Paden
Can anyone reccomend which 5.0.18 binary packages should be used with FC4? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: innodb select

2006-01-13 Thread Gleb Paharenko
Hello. Does this have anything to do with the variable: | tx_isolation| REPEATABLE-READ| It seems it is. If you use InnoDB only due to speed issues, change the transaction isolating level to READ UNCOMMITED. See:

Re: FC4 binaries and mysql 5.0

2006-01-13 Thread Gleb Paharenko
Hello. For my laptop I use MySQL-server-standard-5.0.18-0.rhel4.i386.rpm (RHEL4 (x86) - Server). Brett Paden wrote: Can anyone reccomend which 5.0.18 binary packages should be used with FC4? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is

Performance

2006-01-13 Thread Sebastien Roy
Hey guys, In my last email I was talking about 5 daemon on the same box. We change that to use only one daemon and we upgrade to 5.0.xx-64bit instead of 4.1.xx-64bits. The machine itself it's a 12 CPU running AIX 5.3 ML03 with 4 Gig of RAM. The machine it's big web server running

Re: Specifying the location of a database

2006-01-13 Thread Beau E. Cox
On Friday 13 January 2006 09:27 am, Gleb Paharenko wrote: Hello. Usually for this purposes symbolic links are used: http://dev.mysql.com/doc/refman/5.1/en/symbolic-links.html Thanks Gleb - works fine :) For load balancing you may want to use partitioning as well:

Re: Mysql Query Optimization?

2006-01-13 Thread Scott Baker
It looks like I spoke too soon. That field fix sped up the straight join, but not the more complex query I had, it's still 0.3 seconds. SELECT EmailID, EmailUsername, d.DomainName, e.CustID FROM EmailAddr e, Domain d, CustInfo c WHERE e.CustID = c.CustID AND e.DomainID = d.DomainID AND

Re: MERGE tables considered harmful for data warehouse fact tables

2006-01-13 Thread sheeri kritzer
(still catching up!) Tom, We have similar queries where I work, and a union is the best way to go. Leaving the tables large eats up valuable buffer space for us, putting the logic in the client app is a bad idea (since you'd have to do it for all apps). In particular, our sessions table is

Re: Mysql Query Optimization?

2006-01-13 Thread Scott Baker
Ops, forgot to reply to this list Gleb: +---+---+---+-+-+--+--+-+ | table | type | possible_keys | key | key_len | ref | rows | Extra |

Re: High Performance MySQL on Amazon

2006-01-13 Thread mos
At 09:10 AM 1/12/2006, Ian wrote: Hi, On Amazon uk there are two versions of the book High Performance MySQL : 1st: High Performance MySQL ~Jeremy D. Zawodny, Derek Balling O'Reilly Paperback - April 23, 2004 £19.95 2nd: High Performance MySQL ~Derek J. Balling O'Reilly Vlg. GmbH Co.

IS_USED_LOCK does not appear to work

2006-01-13 Thread Darth Vader
IS_USED_LOCK does not return the correct connection identifier in the following scenario (this is MySQL 4.1.11-2): Open two connections to MySQL (note the connection identifiers). Run the following statements, in order: On connection 1: SELECT GET_LOCK('42',600); On connection 2: SELECT

Re: IS_USED_LOCK does not appear to work

2006-01-13 Thread Paul DuBois
At 16:14 -0800 1/13/06, Darth Vader wrote: IS_USED_LOCK does not return the correct connection identifier in the following scenario (this is MySQL 4.1.11-2): Open two connections to MySQL (note the connection identifiers). Run the following statements, in order: On connection 1: SELECT

Re: IS_USED_LOCK does not appear to work

2006-01-13 Thread Darth Vader
--- Paul DuBois [EMAIL PROTECTED] wrote: At 16:14 -0800 1/13/06, Darth Vader wrote: IS_USED_LOCK does not return the correct connection identifier in the following scenario (this is MySQL 4.1.11-2): Open two connections to MySQL (note the connection identifiers). Run the following

Re: Geographical advice

2006-01-13 Thread douglass_davis
Ben Clewett wrote: Hi, I have a need to locate (x,y) coordinates from mysql where they are close to another coordinate. For instance, all pizza bars near my car. Example: Searching for points closer than z to (i,j) using Pythagoras: SET i = 10; SET j = 10; SET z = 30; SELECT x, y