Re: What would happen in these two cases?

2004-08-10 Thread Haitao Jiang
Thanks so much for the reply! So, if I understand correctly, to swap the table like I described, I should do: LOCK TABLES A write,A2 write; FLUSH TABLES; rename table A to A1; rename table A2 to A; UNLOCK TABLES; Right? If there is no write to either A or A2, then there is no need to lock the

Re: Update with subquery problem

2004-08-10 Thread Michael Stassen
Subqueries are not supported until mysql 4.1. I'm guessing you have an earlier version. With version 4.0.4 or later, you can accomplish the same thing with a multi-table update: UPDATE tbl1, tbl2 SET tbl1.col1 = tbl1.col1 + 1 WHERE tbl1.ID = tbl2.ID AND tbl2.status='Active'; or

select first row within groups

2004-08-10 Thread Haitao Jiang
Hi, If I want to find out highest score student from each class, how can I do that in MySQL? Assume the table looks like: classId INT, studentId INT, score INT In the case of multiple students from the same class has the same highest score, I would like to get the first one whose studentId is

RE: Update with subquery problem

2004-08-10 Thread Lachlan Mulcahy
Manish, What version of MySQL are you using? The chances are subqueries are not supported in your version. Try restructuring your query as a join like: UPDATE tbl1, tbl2 SET tbl1.col1=tbl1.col1+1 WHERE tbl.ID = tbl2.ID AND tbl2.status='Active'

RE: left join issues!!!

2004-08-10 Thread Lachlan Mulcahy
Bruce, I have reconstructed the database you have given me and used the following query successfully (the one I originally gave you). I think there is something wrong with your data. SELECT p2.statusID as parseStatus, p2.action as parseAction, u2.name, p1.userID,

RE: left join issues!!!

2004-08-10 Thread Lachlan Mulcahy
Bruce, I'm getting the four rows with one correctly matching the userID for tom and the others returning NULLs for the user info. Lachlan -Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 August 2004 5:13 PM To: 'Lachlan Mulcahy' Subject: RE: left join issues!!!

Joing two fields in a query

2004-08-10 Thread shaun thornburgh
Hi, Is it possible to join two fields in a query so that they are displayed as one column? For exmaple: SELECT Firstname + ' ' + Lastname AS 'Name' FROM Users; I hope you can see what I am trying to achieve from SQL here! Thanks for your help

Re: Joing two fields in a query

2004-08-10 Thread Terry Riley
CONCAT() is what you need! SELECT CONCAT(Firstname,' ',Lastname) AS Name FROM Users; Terry - Original Message - Hi, Is it possible to join two fields in a query so that they are displayed as one column? For exmaple: SELECT Firstname + ' ' + Lastname AS 'Name' FROM Users; I

RE: LOAD DATA LOCAL INFILE issue

2004-08-10 Thread Logan, David (SST - Adelaide)
Hi Michael, Yes, I rebuilt it to ensure it was switched on. The configure line was ./configure --enable-local-infile --without-server Regards David Logan Database Administrator HP Managed Services 139 Frome Street, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8

Load data ini file

2004-08-10 Thread Remember14a
Dear Friends, My data in text file isn't been loaded to columns in table. Data text file is in data directory of server. rest of the commands are as follows, any guidance, please. mysql load data - infile 'kemailsusa.txt' - into table - kemailsusa; ERROR 1062: Duplicate entry '0-'

efficiency of searching in SETs (InnoDB)

2004-08-10 Thread Jigal van Hemert
Hi list, We're building a relatively large database with InnoDB tables. The database model is basically: store the data in a table based on the data type. So we have a param_int table for all integer type data: CREATE TABLE `param_int` ( `id` int(11) NOT NULL default '0', `name` varchar(32)

Re: Load data ini file

2004-08-10 Thread Egor Egorov
[EMAIL PROTECTED] wrote: My data in text file isn't been loaded to columns in table. Data text file is in data directory of server. rest of the commands are as follows, any guidance, please. mysql load data - infile 'kemailsusa.txt' - into table - kemailsusa; ERROR 1062:

Re: Access Denied

2004-08-10 Thread Egor Egorov
[EMAIL PROTECTED] wrote: I didn't get a response to the question below, and my alternative solution produced another error message as follows. Rather than try to establish a new database, I used the Test database established when I reinstalled mysql. With a csv file saved under

Errata in the Study Guide

2004-08-10 Thread Patrick Connolly
Is this the most appropriate list to mention misprints? There doesn't seem to be an indication where additional suggestions are to be sent. I found something that, though not exactly incorrect, works for reasons other than what a reader might think, so it's misleading. -- ___ Patrick

Re: what is causing these XX.1.1.1.1 logs?

2004-08-10 Thread Egor Egorov
Ciarochi, Anthony [EMAIL PROTECTED] wrote: -rw-rw1 psccats mysql 63008 Aug 1 23:30 mysqld_bin.054.1.1.1.1 -rw-rw1 psccats mysql 0 Aug 4 04:05 mysqld_bin.054.1 -rw-rw1 psccats mysql 0 Aug 6 04:28 mysqld_bin.054.1.1 -rw-rw1

Re: Do Analyze Table before Optimize Table or the other way around??

2004-08-10 Thread Egor Egorov
Scott Fletcher [EMAIL PROTECTED] wrote: I wanna know is do I do the Analyze the table before the Optimize the table or should I do it the other way around??? If you need to defragment the table, you can just run OPTIMIZE TABLE. -- For technical support contracts, goto

Re: Finding Database and Tables

2004-08-10 Thread Egor Egorov
[EMAIL PROTECTED] wrote: I have mysql installed on a pc running Windows 98. I recently had to reformat a partitioned c drive. My tables were stored in a database called samp_db. When I give the command use samp_db I get Error 1044: Access denied for user: '@localhost' to database

Re: Multiple Connections

2004-08-10 Thread Egor Egorov
Paul McNeil [EMAIL PROTECTED] wrote: So this means that my DB driver is somehow using the same connection when I ask it to create 2 different ones? No way, it uses different connections. *BUT* check your DB interface. It can store the connection handle and don't really open a new connection

Re: What would happen in these two cases?

2004-08-10 Thread Egor Egorov
Haitao Jiang [EMAIL PROTECTED] wrote: Thanks so much for the reply! So, if I understand correctly, to swap the table like I described, I should do: LOCK TABLES A write,A2 write; FLUSH TABLES; rename table A to A1; rename table A2 to A; UNLOCK TABLES; Right? If there is no write to

Re: Uninstalling MySQL

2004-08-10 Thread Egor Egorov
[EMAIL PROTECTED] wrote: Greetings... How do I uninstall MySQL under linux (i have Fedora Core 2)... i will be installing a new version of it... I have 3.23 currently and will replace it with 4. Please Help Thanks Try like that rpm -qa | grep -i mysql This will give you the list of every

Re: What would you store in a BLOB field?

2004-08-10 Thread Egor Egorov
Levi Campbell [EMAIL PROTECTED] wrote: I know the blob field is binary but what would you store there? and if = you could give me an example of real-life uses please. You can store beer, juice or milk, but you need to escape the drink properly to get it back fresh and delicious. ;) Speaking

RE: What would you store in a BLOB field?

2004-08-10 Thread Scott Hamm
Are you saying that BLOB can store external files? I'm not sure if I understood storing any binary data in a way you meant. I'm working on a project where program dumps a file along with report that comes with it. I was thinking maybe I could centerize multi programs' Data to Mysql... I hope I'm

get extended infos over table-columns

2004-08-10 Thread Michael Seele
hi, i need some extended infor over the table-columns! how can i get the maximumDataLength, numericPrecision, numericScale of a column? thx -- G H Softwareentwicklung GmbH Tel.: +49(0)7451/53706-20 Robert-Bosch-Str. 23 Fax: +49(0)7451/53706-90 D-72160 Horb a.N.

Re: get extended infos over table-columns

2004-08-10 Thread Martijn Tonies
Hi, i need some extended infor over the table-columns! how can i get the maximumDataLength, numericPrecision, numericScale of a column? Did you check the documentation? With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL MS SQL Server. Upscene

Re: get extended infos over table-columns

2004-08-10 Thread Michael Seele
yes!! Martijn Tonies schrieb am 10.08.2004 14:03: Hi, i need some extended infor over the table-columns! how can i get the maximumDataLength, numericPrecision, numericScale of a column? Did you check the documentation? With regards, Martijn Tonies Database Workbench - developer tool for

Re: Errata in the Study Guide

2004-08-10 Thread Carsten Pedersen
Hi Patrick, On Tue, 2004-08-10 at 12:16, Patrick Connolly wrote: Is this the most appropriate list to mention misprints? There doesn't seem to be an indication where additional suggestions are to be sent. This could be a good starting place if you want to discuss something in general - if you

Re: get extended infos over table-columns

2004-08-10 Thread Martijn Tonies
yes!! Did you find SHOW [FULL] COLUMNS FROM tablename I know I did when looking through the docs... With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL MS SQL Server. Upscene Productions http://www.upscene.com -- MySQL General Mailing List For

Re: get extended infos over table-columns

2004-08-10 Thread Michael Seele
YES! but these statement DON'T return my needed infos(maximumDataLength, numericPrecision, numericScale)!!! Martijn Tonies schrieb am 10.08.2004 14:27: yes!! Did you find SHOW [FULL] COLUMNS FROM tablename I know I did when looking through the docs... With regards, Martijn Tonies

Re: get extended infos over table-columns

2004-08-10 Thread Martijn Tonies
YES! but these statement DON'T return my needed infos(maximumDataLength, numericPrecision, numericScale)!!! Sure they do - in column Type. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL MS SQL Server. Upscene Productions

RE: mysqld_multi different server versions

2004-08-10 Thread Victor Pendleton
You can use mysqld_multi to run different versions of MySQL on the same Server. You can run 4.0.x, 4.1.x and 5.0.x and manage these with mysqld_multi. -Original Message- From: sean c peters To: [EMAIL PROTECTED] Sent: 8/9/04 4:43 PM Subject: mysqld_multi different server versions In my

Re: select first row within groups

2004-08-10 Thread SGreen
You are looking for a minimum value _within_ a maximum set. In this case, that will take two processing steps: DECLARE TEMPORARY TABLE tmpScores SELECT classid, Max(score) as topscore FROM tablename_goes_here GROUP BY classid; SELECT t.classid, t.Min(studentid), ts.topscore FROM

RE: using temp tables...

2004-08-10 Thread Victor Pendleton
CREATE TEMPORARY TABLE table SELECT * FROM source_table ... Query temp table ... DROP TABLE temp_table -Original Message- From: bruce To: [EMAIL PROTECTED] Sent: 8/10/04 12:45 AM Subject: using temp tables... hi... in trying to get a better understanding of temp tables. is there a way

RE: What would you store in a BLOB field?

2004-08-10 Thread Scott Hamm
Thanks for the detailed answer. I'll change the whole plan, unifying multi databases into Mysql. Appreciate it very much. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 9:20 AM To: Scott Hamm Cc: [EMAIL PROTECTED] Subject: RE: What

RE: What would you store in a BLOB field?

2004-08-10 Thread SGreen
Yes, you can store practically any data in a blob (within the limits of your storage space). As Egor stated, many places put thumbnail images (.bmp, .jpg, or .gif) files into their database for indexed retrieval and storage. These records probably also have a link to the larger (original

Re: get extended infos over table-columns

2004-08-10 Thread SGreen
And now that you know what TYPE a column is, you can use the information found on this page of the manual to answer your other questions http://dev.mysql.com/doc/mysql/de/Column_types.html Regards, Shawn Green Database Administrator Unimin Corporation - Spruce Pine Martijn Tonies [EMAIL

Problem with Slow Update Query

2004-08-10 Thread Martin Rytz
Hi all I have a problem with slow update queries like these (5 examples): update url_cat set domain = '01net' where left( domain, instr( domain, '.' ) -1 ) = '01net'; update url_cat set domain = '1-meta' where left( domain, instr( domain, '.' ) -1 ) = '1-meta'; update url_cat set domain =

Re: Problem with Slow Update Query

2004-08-10 Thread SGreen
First create a table with the fixed domain names: CREATE TABLE FixedDomains SELECT DISTINCT domain, left( domain, instr( domain, '.' ) -1 ) as newdomain FROM url_cat Index your new table (for speed): ALTER FixedDomains ADD INDEX (Domain) *** NOTE: You really want to review (and modify, if

Re: Problem with Slow Update Query

2004-08-10 Thread Michael Stassen
An index on domain cannot be used to satisfy your WHERE clause, because you are comparing the result of a function performed on domain to a value. As soon as you feed your column to a function, you lose the use of an index on that column. So, each and every one of these queries performs a

RE: left join issues!!!

2004-08-10 Thread bruce
but what's your output... when i run the select query you provided, i get a single row... as opposed to the 4/four rows that i expect... (or at least the 4 rows that i'm trying to get!!!) i think what's happening is that the query is triggering off the only value in the userTBL, and matching

Re: Mixing Innodb MyISAM tables

2004-08-10 Thread Egor Egorov
sean c peters [EMAIL PROTECTED] wrote: Im considering a design that mixes InnoDB and MyISAM tables. I want Innodb for speed, etc, but i have one table where i want a column to have a FULLTEXT index on. Thus the need for MyISAM. Im not worried about the performance in using the MyISAM

Re: ERROR 1030 (HY000): Got error 127 from storage engine

2004-08-10 Thread Egor Egorov
Haitao Jiang [EMAIL PROTECTED] wrote: I have done following on a 8 million row table (4GB): repair table optimize table drop one of the fulltext index optimize table again Now fulltext search stop working and I am getting: ERROR 1030 (HY000): Got error 127 from storage engine What

Permissions problem with MySQL 4.1.3 | Update: Same with 5.0.1

2004-08-10 Thread Elie `woe` BLETON
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I also tried the 5.0.1 MAX binaries looking for a solution to my previously posted problem of permissions (see at the bottom of the message for the previous post). According to the hostname.err file: 040810 13:31:44 mysqld started

Re: InnoDB Deletes / Swap Problem

2004-08-10 Thread Egor Egorov
Marvin Wright [EMAIL PROTECTED] wrote: We have just recently moved 1 of our InnoDB cache servers to a new much bigger machine, 4 CPU, 8GB Ram and masses amount of disk space available from a SAN. The OS is Redhat AS 3 with kernel 2.4. MySQL is the only application on this machine and its

Re: Is LOAD DATA INFILE an atomic operation?

2004-08-10 Thread Egor Egorov
Sergei Skarupo [EMAIL PROTECTED] wrote: In MyISAM tables, can LOAD DATA INFILE be considered an atomic operation = under normal circumstances? Yes. What will happen if the server crashes or someone kills the thread? Probably, a table crash. Probably, repairable. -- For technical

bug

2004-08-10 Thread Farnaz Akhavi
I have downloaded and installed MYSQL Client/Server 4.0. 1. when I get a query on SHOW DATABASES, it only shows test and not mysql which has the users info 2. It doesn't give me access to create a new DATABASE and gives me an access denied error. Please advise. Thanks. p.s. I have worked

Re: InnoDB slowness

2004-08-10 Thread Egor Egorov
sean c peters [EMAIL PROTECTED] wrote: I am in the process of upgrading one of my systems to use InnoDB tables, along with some other tweaks to my code. In any case, i just tried to delete around 7000 records from a table, where there are 9 other tables that will cascade delete when rows

combining information from 4 tables into a fifth.

2004-08-10 Thread Jeroen Van Goey
Hey all, I've three tables (g2d, dgp and pocus), with a gene-name, a score and some other information: mysql select * from dgp; ++---+--+--+++ | chr| start | stop | gene_name | score

RE: bug

2004-08-10 Thread Victor Pendleton
Who did you log in as? -Original Message- From: Farnaz Akhavi To: [EMAIL PROTECTED] Sent: 8/10/04 9:57 AM Subject: bug I have downloaded and installed MYSQL Client/Server 4.0. 1. when I get a query on SHOW DATABASES, it only shows test and not mysql which has the users info 2. It

Re: combining information from 4 tables into a fifth.

2004-08-10 Thread Michael Stassen
You didn't give the name of the 4th table, so I'll call it t4. I think this will do: CREATE TABLE score ( gene_name CHAR(15), score_g2d REAL, score_dgp REAL, score_pocus REAL) SELECT t4.gene_name, COALESCE(g2d.score,0), COALESCE(dgp.score,0),

Re: combining information from 4 tables into a fifth.

2004-08-10 Thread SGreen
I don't know about everyone else but I would build scores like this: Create an empty scores table. Make gene_name the Primary Key. Allow the other columns to be null or give them a default of 0.0. Whatever that value is will represent no score available (I suggest null as a score of 0 may be a

Re: connect to mySQL without database

2004-08-10 Thread Karam Chand
Probably I was late in replying (just busy with some stupid work). In all the API if you dont specify the dbname in the mysql_connect() functions. In C the connection function is mysql_real_connect(), in PHP its mysql_pconnect(), donno about other APIs. You can get a list of dbs by issueing

InnoDB file per table directive

2004-08-10 Thread sean c peters
I've been reading (and reading...) the innodb documentation about using the innodb_file_per_table directive, and one thing still confuses me. If i use this directive, then is it correct that the setting innodb_data_file_path will specify the shared innodb information? Also, when i create

trouble building mysql 4.1.3

2004-08-10 Thread sean c peters
I am getting an error from make test when trying to build MySQL 4.1.3 beta The error is as follows: ERROR: .../mysql-4.1.3-beta/mysql-test/var/run/master.pid was not created in 30 seconds; Aborting make: *** [test] Error 1 I read online about using the --with-extra-charset=complex with

Re: using mysql in commercial software

2004-08-10 Thread Zak Greant
On Aug 09, 2004, at 17:56, Jeremy Zawodny wrote: This is confusing. There are *two* official places to discuss the licensing and community issues? Ugh. Or am I misunderstanding things? The licensing forum seems to generally be used provide quick answers on licensing questions for proprietary

Pattern Matching

2004-08-10 Thread Jason Glicken
I have 2 tables set up in MySQL, one with a dialed number field and duration, the other with a list of country codes, there names, and the rates. I am trying to match the dialed number with country code. My problem is I cannot get the results based on the longest possible match? I am not even

OOPs wrong query on initial post

2004-08-10 Thread Jason Glicken
I have 2 tables set up in MySQL, one with a dialed number field and duration, the other with a list of country codes, there names, and the rates. I am trying to match the dialed number with country code. My problem is I cannot get the results based on the longest possible match? I am not even

Difference between PostgreSQL and MySQL

2004-08-10 Thread EWAGW
Hi all, mr.super newbie here, what is the best for cold fusion development? I know that NASA uses MySQL but I have also been told that more 'professionals'(???) use PostgreSQL. Let the flaming begin!! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

want input on method to avoid replication conflicts

2004-08-10 Thread Justin Swanhart
I have four machines A,B,C,D.. A and B are dual masters while C and D are read only slaves A --- B | | C D I have a load balancer that connects all clients to A, and when it fails, connects them to be. In practice it is a little more complicated, because if a server becomes

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread Brad Tilley
EWAGW wrote: Hi all, mr.super newbie here, what is the best for cold fusion development? I know that NASA uses MySQL but I have also been told that more 'professionals'(???) use PostgreSQL. Let the flaming begin!! No need for flames. I think the two are converging. PostgreSQL started out with a

Re: What would happen in these two cases?

2004-08-10 Thread Haitao Jiang
It would be great if there is a swap table command that is atomic. Thanks a lot Haitao On Tue, 10 Aug 2004 13:23:30 +0300, Egor Egorov [EMAIL PROTECTED] wrote: Haitao Jiang [EMAIL PROTECTED] wrote: Thanks so much for the reply! So, if I understand correctly, to swap the table like I

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread Jochem van Dieten
On Tue, 10 Aug 2004 15:35:20 -0500, EWAGW [EMAIL PROTECTED] wrote: Hi all, mr.super newbie here, what is the best for cold fusion development? The best depends on the requirements. You have not told us any requirements, except that you work with ColdFusion. If that is *really* the only

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread EWAGW
Thanks for the reply Brad, in that case I think I will stick with mysql as it seems more people use mysql in the cold fusion community at present, cheers - Original Message - From: Brad Tilley [EMAIL PROTECTED] To: EWAGW [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 10, 2004

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread SGreen
Well, since you admitted to being a newbie, I would suggest that you learn with MySQL. It supports several types of data storage (memory only, ISAM, full-relational) and both transacted and non-transacted execution models. That's just about everything you could want a database to do.

make test grant_cache test failing

2004-08-10 Thread sean c peters
Hi all, still building 4.1.3 I am now getting an error in make test like this: ERROR: ... At line 136: Result length mismatch (the last lines may be the most important ones) Below are the diffs between actual and expected results: --- ***

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread Josh Trutwin
On Tue, 10 Aug 2004 16:45:29 -0400 Brad Tilley [EMAIL PROTECTED] wrote: No need for flames. I think the two are converging. One area where MySQL beat Postgres is in Windows installation. Installing postgres on Windohs is like pulling your fingernails off slowly. I hear they are close to full

What capacity of registers will mysql support?

2004-08-10 Thread EWAGW
Will it work with 20 million for example? Thanks a lot for any advice

MySQL 4.0.20 vs MySQL 4.1.3b

2004-08-10 Thread Haitao Jiang
Hi, I just wondering if there is a list of important features or bug fixes comparing these two versions. We are debating whether to go one or the another. Also, when is the 4.1.4 going to come out? Is it still beta? Thanks so much! HT -- MySQL General Mailing List For list archives:

Re: What capacity of registers will mysql support?

2004-08-10 Thread EWAGW
- Original Message - From: EWAGW To: [EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:08 PM Subject: What capacity of registers will mysql support? Will it work with 20 million for example? Thanks a lot for any advice

Re: make test grant_cache test failing

2004-08-10 Thread Michael Dykman
On Tue, 2004-08-10 at 16:59, sean c peters wrote: Hi all, still building 4.1.3 I am now getting an error in make test like this: ERROR: ... At line 136: Result length mismatch (the last lines may be the most important ones) Below are the diffs between actual and expected results:

Re: make test grant_cache test failing

2004-08-10 Thread sean c peters
UPDATE: I modified the grant_cache.result file to the expected output and got past the test. It looked like the incorrect query was being issued, or in any case that make test was doing something different than what the grant_Cache.result file expected On Tuesday 10 August 2004 15:59, sean c

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread Martijn Tonies
Subject: Re: Difference between PostgreSQL and MySQL Well, since you admitted to being a newbie, I would suggest that you learn with MySQL. It supports several types of data storage (memory only, ISAM, full-relational) and both transacted and non-transacted execution models. Ehm no - not

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread Martijn Tonies
No need for flames. I think the two are converging. One area where MySQL beat Postgres is in Windows installation. Installing postgres on Windohs is like pulling your fingernails off slowly. I hear they are close to full Windows support though in the 8.x branch. FYI:

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread EWAGW
Thanks a lot Shawn, Josh and Brad for your great advice. The command line interface you talk about is that in MySQL administrator? MySQL's command line interface and programming API also are nicer for newer users. Why in the world do I need to remember to type \d to show my tables? That

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread EWAGW
Thank Jochem as well interesting reply got me thinking - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 3:51 PM Subject: Re: Difference between PostgreSQL and MySQL On Tue, 10 Aug 2004 15:35:20 -0500, EWAGW [EMAIL

Re: What would happen in these two cases?

2004-08-10 Thread Justin Swanhart
You can put multiple renames in one statement, and the entire rename will be atomic.. I create summary tables from some of my data, and I periodically refresh them. When refreshing them I create new tables to replace the old tables with.. Then I do: rename current_table to old_table, new_table

Re: What would happen in these two cases?

2004-08-10 Thread Haitao Jiang
That is what I need! Thanks so much again to everyone! HT On Tue, 10 Aug 2004 14:32:13 -0700, Justin Swanhart [EMAIL PROTECTED] wrote: You can put multiple renames in one statement, and the entire rename will be atomic.. I create summary tables from some of my data, and I periodically

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread Jochem van Dieten
On Tue, 10 Aug 2004 16:00:12 -0500, Josh Trutwin wrote: One area where MySQL beat Postgres is in Windows installation. Installing postgres on Windohs is like pulling your fingernails off slowly. It is more like following the manual. Not hard, you just have to take it one step at a time.

Re: What would happen in these two cases?

2004-08-10 Thread Justin Swanhart
FYI, the atomicity of rename and using it to swap tables is discussed in the manual here: http://dev.mysql.com/doc/mysql/en/RENAME_TABLE.html Justin On Tue, 10 Aug 2004 13:50:34 -0700, Haitao Jiang [EMAIL PROTECTED] wrote: It would be great if there is a swap table command that is atomic.

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread Jochem van Dieten
On Tue, 10 Aug 2004 16:49:26 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Well, since you admitted to being a newbie, I would suggest that you learn with MySQL. It supports several types of data storage (memory only, ISAM, full-relational) and both transacted and non-transacted execution

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread EWAGW
Thanks Emmett and Martijn!! - Original Message - From: EWAGW [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:31 PM Subject: Re: Difference between PostgreSQL and MySQL Thank Jochem as well interesting reply got me thinking - Original Message -

Re: Difference between PostgreSQL and MySQL

2004-08-10 Thread mos
At 03:35 PM 8/10/2004, you wrote: Hi all, mr.super newbie here, what is the best for cold fusion development? I know that NASA uses MySQL but I have also been told that more 'professionals'(???) use PostgreSQL. Let the flaming begin!! One thing that wasn't mentioned is MySQL requires a license

Re: want input on method to avoid replication conflicts

2004-08-10 Thread Justin Swanhart
Each server inserts a hearbeat value into a replicated table. The server can see when the last heartbeat it received from its master was. If a heartbeat has not been received from the master in 3 minutes, and the master is available, then the replication status is checked with show slave status

Re: Jeremy Zawodny's gcc flags or MySQL AB' for a FreeBSD?

2004-08-10 Thread Jeremy Zawodny
On Thu, Aug 05, 2004 at 12:19:37PM +0900, Evgeny Chuykov wrote: Good day. From these sources: http://jeremy.zawodny.com/blog/archives/000458.html http://dev.mysql.com/doc/mysql/en/FreeBSD.html Jeremy is using -O -march=pentiumpro and MySQL AB -O2 -fno-strength-reduce. Does anyone

Re: Setting custom information in processlist

2004-08-10 Thread Jeremy Zawodny
On Thu, Aug 05, 2004 at 12:36:55PM +0100, Naran Hirani wrote: Hi, I'm using a single shared user-login for a web-based application to my mysql database - is there a way of including some information at connect time or during processing that would show up when issuing `show processlist'?

Re: High Memory Usage

2004-08-10 Thread Jeremy Zawodny
On Thu, Aug 05, 2004 at 10:27:54AM -0500, Sashi Ramaswamy wrote: Hi, All of a sudden the memory used by mysql threads has gone up. Each thread is consuming about 20 M of RAM. My databases are really small and usage is not very intense. Tables in the database are of type INNODB. MySQL

Update on condition

2004-08-10 Thread Scott Haneda
I need to do a certain update based on a condition: MySql4 Update table set bounce_count = bounce_count+1 is the basic query, somewhere in there I need to only do a if bounce_count+1 10 then update status = 'bounced_out' -- - Scott

Re: Setting custom information in processlist

2004-08-10 Thread Justin Swanhart
Oracle has a procedure called DBMS_APPLICATION_INFO.SET_APPLICATION_INFO that allows you to specify up to 64k of addtional information about the current connection. It doesn't have any way to specify this information at connect time though. The data can be accessed in Oracle through the

RE: Difference between PostgreSQL and MySQL

2004-08-10 Thread Lachlan Mulcahy
Just in addition, The current pricing on the MySQL site is 440EUR for the Pro License and 220EUR for the Classic License. The difference is that classic excludes the InnoDB storage engine. People may argue over the strict legal line where licenses are required to be purchased, especially when

Re: CREATE performance degradation from 4.0.17 - 4.0.20

2004-08-10 Thread Jeremy Zawodny
On Wed, Aug 04, 2004 at 04:32:42PM +0300, Egor Egorov wrote: Sergei Golubchik [EMAIL PROTECTED] wrote: We're upgrading from 3.23.58 to 4.0.20 and found that that although the ALTER test results of sql-bench had been greatly improved, CREATE has shown nasty performance degradation. Just

RE: Update on condition

2004-08-10 Thread Lachlan Mulcahy
Scott, This may work for you: UPDATE tableName SET bounce_count = bounce_count +1, status = 'bounced_out' WHERE (bounce_count + 1) 10; UPDATE tableName SET bounce_count = bounce_count + 1 WHERE status 'bounced_out' AND

Re: Update on condition

2004-08-10 Thread Michael Stassen
How about UPDATE table SET bounce_count = bounce_count+1, status = if(bounce_count 9, 'bounced_out', status) WHERE ...; Michael Scott Haneda wrote: I need to do a certain update based on a condition: MySql4 Update table set bounce_count = bounce_count+1 is the basic query, somewhere

Re: Update on condition

2004-08-10 Thread Michael Stassen
And note that assignments are evaluated left to right, so the value of bounce_count has already been incremented when we get to the status assignment. Adjust accordingly. Michael Michael Stassen wrote: How about UPDATE table SET bounce_count = bounce_count+1, status = if(bounce_count

Using foreign char sets

2004-08-10 Thread Kevin Reeder
Hi, My native tongue is english but I'm learning finnish and want to create a database using my new language. Swe7 will apparently cover the few characters I need which aren't part of the latin1 set. So I've restarted the server with the option, --default-character-set=swe7 What I think I need

Re: MySQL 4.0.20 vs MySQL 4.1.3b

2004-08-10 Thread Jeremy Zawodny
On Tue, Aug 10, 2004 at 02:12:50PM -0700, Haitao Jiang wrote: Hi, I just wondering if there is a list of important features or bug fixes comparing these two versions. We are debating whether to go one or the another. Also, when is the 4.1.4 going to come out? Is it still beta? Sure there

Re: efficiency of searching in SETs (InnoDB)

2004-08-10 Thread Jeremy Zawodny
On Tue, Aug 10, 2004 at 11:40:28AM +0200, Jigal van Hemert wrote: How efficient is InnoDB with searching in such sets? Will it use an index or must it perform a full table search? Are there alternatives which are more efficient regarding search speed? Sets result in table scans if they're