time taken by mysqldump

2007-05-24 Thread Ananda Kumar
Hi All, We have database of around 100GB, and planning to take dump using mysqldump. Can you please let how much time it would take for 100GB. We have 8GB RAM and 4 intel latest processor. The mysql db is running on linux. regards anandkl

Re: time taken by mysqldump

2007-05-24 Thread B. Keith Murphy
Have you considered replicating to a backup server and then dumping from it? No matter your processors with a 100gb db it is going to take a significant amount of time. Keith Ananda Kumar wrote: Hi All, We have database of around 100GB, and planning to take dump using mysqldump. Can you

Re: time taken by mysqldump

2007-05-24 Thread Ananda Kumar
Hi Keith, I will be doing this from my slave database. Any rough estimate of time for 100gb mysqldump. regards anandkl On 5/24/07, B. Keith Murphy [EMAIL PROTECTED] wrote: Have you considered replicating to a backup server and then dumping from it? No matter your processors with a 100gb db

Re: design choice - quite many tables

2007-05-24 Thread Przemys?aw Klein
Wm Mussatto wrote: Assuming you are using MYISAM table types, each table requires at least three files on the disk. If they are in one database they will all be in one directory (how fast is your OS at finding the files in its directory structure?). Are they going to be opened at the same time

Illegal mix of collations

2007-05-24 Thread Octavian Rasnita
Hi, I have tried to select data from more tables using union, but it gaves the following error: ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'UNION' I have verified the tables (using show create table table_name)

Re: Broken Tables, was:Memory Problems

2007-05-24 Thread Christoph Klünter
Just for the logs: Finally I found the failure. It was the Raid-Controller (3ware). It seems that the 64-bit Kernel has troubles with this Device. I tried different mainboards with different controllers and the failure was reproducable with a 3ware-8000. I tried two of them. Cheers, Christoph

problem with timestamp data type

2007-05-24 Thread Alessandro Agostini
Hi to all, I have a strange error on using of timestamp data type. See the follow table definition and insert command. DROP TABLE IF EXISTS Storicocorrenti; CREATE TABLE Storicocorrenti ( ID_LINEA mediumint(6) unsigned zerofill NOT NULL default '00', DATAORA timestamp NOT NULL default

Re: problem with timestamp data type

2007-05-24 Thread Baron Schwartz
Hello Allesandro, Alessandro Agostini wrote: Hi to all, I have a strange error on using of timestamp data type. See the follow table definition and insert command. DROP TABLE IF EXISTS Storicocorrenti; CREATE TABLE Storicocorrenti ( ID_LINEA mediumint(6) unsigned zerofill NOT NULL default

Re: problem with timestamp data type

2007-05-24 Thread Joerg Bruehe
Hi Alessandro, all ! Baron Schwartz wrote: Hello Allesandro, Alessandro Agostini wrote: [[...]] Watching the table content, I see second record as: 032100, '2005-03-27 03:00:00', 0, '40.00', '0.000', '0.000', 0, '0.00' MySql change the time information of DATAORA field from 02:00:00

RE: problem with timestamp data type

2007-05-24 Thread David Lombardi
Maybe, it has to do with the TIMESTAMP behavior: whenever you insert a TIMESTAMP value MySQL converts it to UTC and converts it back to local time (or the time you entered). To prevent this behavior you can - change TIMESTAMP into DATETIME or - disable it by adding this setting to the MY.INI

Integrity on large sites

2007-05-24 Thread Naz Gassiep
I'm working in a project at the moment that is using MySQL, and people keep making assertions like this one: *Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via, say, optimistic

Re: expanding hierarchies

2007-05-24 Thread Peter Brawley
tbt the number of levels in this table is unknown and the query should work for any number of levels please provide a sample 'select' query in mysql That's a graph, which is recursive, so you need an sproc. See edge list sprocs at

auto incrementing fields

2007-05-24 Thread Ronan McGlue
I have just realised why my statistics package is throwing up anomolies for my data set. Whenever I auto increment a counter field, if its the first time it is set to 0 as opposed to 1, this is im sure due to my creating of the table and assigning the field values initial value to be null...

Re: expanding hierarchies

2007-05-24 Thread Naz Gassiep
The definitive answer to anything that requires trees in SQL is nested sets. I have written a tutorial on the subject, as this is about the most asked question in DB relational data modeling. http://www.mrnaz.com/static/articles/trees_in_sql_tutorial/ Enjoy :) - Naz. Peter Brawley wrote: tbt

Re: Integrity on large sites

2007-05-24 Thread Peter Brawley
Naz, *Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via, say, optimistic locking), never the database level. Mebbe that view was common in the MySQL community in the time of

Re: expanding hierarchies

2007-05-24 Thread Peter Brawley
Naz writes The definitive answer to anything that requires trees in SQL is nested sets. They are not definitive when the tree is large and must be updated frequently. PB - Naz Gassiep wrote: The definitive answer to anything that requires trees in SQL is nested sets. I have written a

Re: expanding hierarchies

2007-05-24 Thread Naz Gassiep
Really? The ability to manipulate trees with single queries was what made them so scalable in my mind. What is the better way to handle large frequently updated trees? This is the best method I know, I'd love to learn of a better one. - Naz. Peter Brawley wrote: Naz writes The definitive

Re: expanding hierarchies

2007-05-24 Thread Peter Brawley
Naz, The ability to manipulate trees with single queries was what made them so scalable in my mind. What is the better way to handle large frequently updated trees? This is the best method I know, I'd love to learn of a better one. For large frequently updated trees DAGs I prefer edge lists,

Re: Integrity on large sites

2007-05-24 Thread Martijn Tonies
I'm working in a project at the moment that is using MySQL, and people keep making assertions like this one: *Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via, say, optimistic

Re: design choice - quite many tables

2007-05-24 Thread Wm Mussatto
On Thu, May 24, 2007 2:12, Przemys?aw Klein said: Wm Mussatto wrote: Assuming you are using MYISAM table types, each table requires at least three files on the disk. If they are in one database they will all be in one directory (how fast is your OS at finding the files in its directory

JOIN to replace column?

2007-05-24 Thread Andreas Iwanowski
Hello MySQL community, I have a table that contains a foreign key, e.g. ID - Local unique key UserID - Foreign key Data Is it possible to do a JOIN on the Users table to replace UserID with the name of the user, as in the Name column of the Users table? I've tried several JOINS, but I JOIN the

Need confirmation: Subselects are broken with regards to index usage?

2007-05-24 Thread Robert DiFalco
I think I'm discovering that sub-selects in MySQL are broken. Is that true? It seems like you cannot have a sub-select without doing a table scan -- even for a constant IN expression -- this because it gets re-written as an EXISTS that executes for each row. Is that true? Forcing an index

Re: Integrity on large sites

2007-05-24 Thread Philip Mather
Naz, Without going into detail about various projects I've seen, surfice it to say that I have wittnessed some true horrors. In defence however, the largest abomination I have ever witnessed was from an MS shop that had grown a database from a MS Access system upward and had then, bluntly

RE: Need confirmation: Subselects are broken with regards to index usage?

2007-05-24 Thread Robert DiFalco
Ok, so I guess it is more complicated than that. This query which has 5M records that match its criteria returns instantly: SELECT ELEMS.id FROM ELEMS WHERE (( ELEMS.nodeID IN ( SELECT link.childID FROM link JOIN path ON

FK support on myISAM, Parallelization, pronunciation and all kinds of goodness...

2007-05-24 Thread Daevid Vincent
Whoa!? I was just reading this page (http://en.wikipedia.org/wiki/MySQL), and noticed a few things... http://en.wikipedia.org/wiki/Foreign_key Foreign key support for all storage engines will likely be released with MySQL 5.2 (although it has been present since version 3.23.44 for

Re: Integrity on large sites

2007-05-24 Thread Evaldas Imbrasas
Since the question was about *really* big websites, the answer is both yes and no. Yes, they do turn off RI on the database side, simply because it's not possible to enforce RI on a database system where data is partitioned across server farms (or shards) both vertically and horizontally. And

RE: time taken by mysqldump

2007-05-24 Thread Tim Lucia
I can give you a rough estimate: My /data partition is 67G. The gzipped output of mysqldump is 20G. It takes about 53 minutes. Extrapolating to 100G would give (50% more) about 78 minutes. On a Dell 2950 running Xeon 5160/3GHz (4 cores), 8Gb memory, RAID 10 15K rpm drives (Perc 5/I SAS I

Re: Need confirmation: Subselects are broken with regards to index usage?

2007-05-24 Thread Baron Schwartz
Hi Robert, The way non-correlated subqueries are sometimes optimized into correlated ones and then executed for each row in the outer table is a well-known MySQL deficiency, yes. I would not really look for it to be fixed soon, though it's been in progress for a while. The version in which

How to get the table.column in mysql client tab completion? Or feature request to add this.

2007-05-24 Thread Daevid Vincent
Is there a way to get the full table.column always in mysql client when using the auto-tab completion feature? I'm currently using 5.0.36. The way it works now is a bit confusing. Notice I have TWO different DateOnly columns (for example) in two different tables. [middle column] mysql select

Re: Integrity on large sites

2007-05-24 Thread Naz Gassiep
Data partitioning? Sorry, I disagree that partitioning a table into more and more servers is the way to scale properly. Perhaps putting databases' tables onto different servers with different hardware designed to meat different usage patterns is a good idea, but data partitioning was a very short

Re: Integrity on large sites

2007-05-24 Thread B. Keith Murphy
Sometimes partitioning is absolutely necessary. If you can't run a cluster - how else can you really scale writes to the database? Some companies can't use clustering because in 5.0.x (the non-beta release) clustering is all done in memory - all tables have to be in memory (just like the old

Re: Integrity on large sites

2007-05-24 Thread Evaldas Imbrasas
You certainly have a right to disagree, but pretty much every scalability talk at the MySQL conference a few weeks ago was focused on data partitioning and sharding. And those talks very given by folks working for some of the most popular (top 100) websites in the world. It certainly looks like

Re: Integrity on large sites

2007-05-24 Thread Naz Gassiep
Wow. The problem with sharding I have is the large amount of code required in the app to make it work. IMHO the app should be agnostic to the underlying database system (by that I don't mean the DB in use such as MySQL or whatever or the schema, I mean the way the DB has been deployed) so that

MySQL 5.0 creates 100,000 Window handles

2007-05-24 Thread mos
I noticed if my program executes a lot of Select statements, Windows XP will slow down when the program completes. I did some investigating and mysqld-nt.exe has close to 100,000 handles created when my program ends (shown in Task Manager and SysInternals Process Explorer). As each Select

Re: Integrity on large sites

2007-05-24 Thread B. Keith Murphy
OK. Going to try this again. After reading through these emails I think I have learned a little more about the way you are thinking. I DO NOT want to start some kind of flame war. However, I disagree very strongly with what you are saying. Yes, you are right, sharding does require more