performance on single column index with few distinct values

2005-05-27 Thread Terence
Hi list, I have run into problems on a master table for our helpdesk. We have the following table: ticket_id (int) - autoincrement (indexed) master_id (int) (indexed) Master ID is used to distinguish multiple helpdesks. In this table there are 100k records, but only 10 distinct master_id's.

Re: No Longer Receiving Emails

2005-05-27 Thread Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem
On Fri, May 27, 2005 at 08:48:38PM +0200, Rob Cochrane wrote: > Works > > Rob > > > Tucker, Gabriel wrote: > > >Hi > > > >I have not received anything from this list for a couple of days. I just > >tried to "re-register", and that did not help. > > > >If anyone reads this, please reply to ME

Re: MySQL preg_split functionality?

2005-05-27 Thread Scott Klarenbach
-- How is 'xFxIxExLxDx1x' easier to search than 'FIELD1'? It's not easier. It is; however, accurate for the purpose at hand. FIELD1 isn't completely inclusive...it would miss FIELD-1... -- However, It seems to me that this kind of data manipulation (cleanup) needs to happen BEFORE the data ente

Re: Select MAX(column1,column2)

2005-05-27 Thread Scott Klarenbach
select greatest(max(col1), max(col2), max(col3), max(col4)) from table works the best, as Keith pointed toward initially. Remember, I forgot to mention that I wanted the greatest for the whole table, not just for each rowso, 10, 12, 8 is not what I wanted...out of 10 2 3 5 4 8 1 12 7 i

Re: Select MAX(column1,column2)

2005-05-27 Thread mfatene
I forgot : 10, 12, 8 is not a row !!! Mathias Selon [EMAIL PROTECTED]: > Hi Keith, > yes concat makes an associative lost for max. > But if we split the desc on all the columns, it works : > > mysql> select * from numbers > -> order by a desc,b desc,c desc > -> limit 1; > +--+--

Re: Select MAX(column1,column2)

2005-05-27 Thread mfatene
Hi Keith, yes concat makes an associative lost for max. But if we split the desc on all the columns, it works : mysql> select * from numbers -> order by a desc,b desc,c desc -> limit 1; +--+--+--+ | a| b| c| +--+--+--+ | 10 |2 |3 | +--+

Re: MySQL Migration Tool - who wrote it?

2005-05-27 Thread Harrison Fisk
Hi, On May 26, 2005, at 5:03 PM, David Griffiths wrote: This isn't exactly the right spot, but I can't find any info on the MySQL web site. Anyone know who maintains the MySQL Migration Tool (or who is developing it, as it is currently Apha)? MySQL AB is actively developing it (hence why i

Re: Select MAX(column1,column2)

2005-05-27 Thread Keith Ivey
[EMAIL PROTECTED] wrote: Hi all, what is max ? it's the first row when we sort data in descending order. so select col1,col2,col3,col4 ... from table order by concat(col1,col2,col3,col4 ... ) desc LIMIt 1; should be silar to what is needed. I say should :o) That would only work if the greate

Re: Select MAX(column1,column2)

2005-05-27 Thread mfatene
Hi all, what is max ? it's the first row when we sort data in descending order. so select col1,col2,col3,col4 ... from table order by concat(col1,col2,col3,col4 ... ) desc LIMIt 1; should be silar to what is needed. I say should :o) Mathias Selon Scott Klarenbach <[EMAIL PROTECTED]>: > Thanks

Re: Inner workings of a JOIN

2005-05-27 Thread Roger Baklund
James Tu wrote: What does MySQL do internally when you perform a LEFT JOIN? You can read about it here: http://dev.mysql.com/doc/mysql/en/left-join-optimization.html > If you need more details, you could read the source... Let's say you have two tables: Table A has 1,000,000 rows Table B ha

Re: Query performance...two table design options

2005-05-27 Thread Roger Baklund
James Tu wrote: Hi: Let's say I want to store the following information. Unique ID - INT(10) autoincrement First Name - VARCHAR (25) Last Name - VARCHAR (25) Age - INT(3) In general 'age' is a bad column, because you need to know what year the data was entered to calculate the current age. I

how to print warnings from mysqlimport...debug_options ??

2005-05-27 Thread Bomb Diggy
I can't seem to get ahold of the 6 warnings being generated when I import a csv file. My ~/.my.cnf file says this: [client] fields-terminated-by=, fields-enclosed-by=\" #debug=log.txt #debug=d,info,error,query,general,where:1,load.trace debug=warning,load.trace Nothing I do in the 'debug' para

Re: MySQL preg_split functionality?

2005-05-27 Thread SGreen
Scott Klarenbach <[EMAIL PROTECTED]> wrote on 05/27/2005 04:38:40 PM: > Ya, it is a little too specific...here's why I need it. > > I have a client that wants to search for part numbers in his DB. The > problem is, they come into his DB from external sources, with all > sorts of special charact

Re: Select MAX(column1,column2)

2005-05-27 Thread Scott Klarenbach
Thanks Keith. It didn't quite work as expected, but it helps me a lot none the less. The Documentation says it returns the max value, so select greatest(1, 2, 3, 4) will return 4. But, across multiple column names, it returns all the values in one column, not just the greatest one...so select g

Re: MySQL preg_split functionality?

2005-05-27 Thread Scott Klarenbach
Ya, it is a little too specific...here's why I need it. I have a client that wants to search for part numbers in his DB. The problem is, they come into his DB from external sources, with all sorts of special characters in them... So, he has fields like field_one!, fi--eld 2, @fi#eld__3xxx e

Re: Inner workings of a JOIN

2005-05-27 Thread Daniel
At http://dev.mysql.com/doc/mysql/en/explain.html the paragraph starting with "EXPLAIN returns a row of information for each table used in the SELECT statement" explains the process briefly. In general MySQL reads/finds rows while also satisfying other conditions. In your example below, if there's

RE: Select MAX(column1,column2)

2005-05-27 Thread Jay Blanchard
[snip] Can I select the maximum value across multiple columns? ie, I'd like to select the highest value of buyCost AND sellCost in a table...where buy and sell are two different columns in the same table. i actually have 4 comparisons to run, and don't want to have to execute 4 queries. [/snip]

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

2005-05-27 Thread Qunfeng
But while I copied all the table files from A (testing machine) to machine B (real server), no data was writing into A's tables.Are you saying that I have to shut down the mysqld on machine A or activate WRITE lock to A before copying over to machine B? Qunfeng At 02:52 PM 5/27/2005, Eri

Re: No Longer Receiving Emails

2005-05-27 Thread Jim Winstead
lists.mysql.com was down temporarily due to a faulty disk. Mails to and from the lists should be working now. When you notice a disruption like this, it is best if you simply check http://lists.mysql.com/ to verify if there are mails in the archive that you have not yet received, and just be pati

Re: No Longer Receiving Emails

2005-05-27 Thread David Griffiths
I stopped receiving email most of yesterday as well - it's still catching up today. I think there was a hiccup in the list. David Cummings, Shawn (GNAPs) wrote: It's possible that Gabe's mail spool is full, and he is not receiving mail - including our responses. Gabriel - if you are rece

Re: Using MySQL to store/archive code/html etc?

2005-05-27 Thread Frank Bax
At 02:46 PM 5/27/05, zzapper wrote: Today I designed a fairly cute error404.php page, which I'd like to reuse in future. Currently I rely on remembering that I created such a page for say ACME Carpets. Now and again my memory fails to remember which site I developed a piece of HTML,PHP,Perl,J

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

2005-05-27 Thread Eric Bergen
If you are copying a file that mysql is writing to sections of the file are going to be from different points in time so when that all gets put backtogether in one file on the other end it's going to be corrupt. Qunfeng wrote: No, I didn't shut down mysqld or read lock. Would you please elabor

Re: MySQL preg_split functionality?

2005-05-27 Thread Eric Bergen
I'm working on a set of UDFs for preg functions. [EMAIL PROTECTED] wrote: I have a hard time figuring out when you would use such a function. I do not believe you will be able to duplicate this behavior without constructing your own UDF or by writing a stored procedure. BTW, why *do* you wan

Re: No Longer Receiving Emails

2005-05-27 Thread Cummings, Shawn (GNAPs)
It's possible that Gabe's mail spool is full, and he is not receiving mail - including our responses. Gabriel - if you are receiving any messages directly sent to you - please respond to the list to rule that out. If no responses are made to any of either directly or through the list, then

Re: Using MySQL to store/archive code/html etc?

2005-05-27 Thread SGreen
news <[EMAIL PROTECTED]> wrote on 05/27/2005 02:46:09 PM: > Hi, > Today I designed a fairly cute error404.php page, which I'd like to > reuse in future. > Currently I rely on remembering that I created such a page for say > ACME Carpets. > > Now and again my memory fails to remember which site

Re: newbie desperately seeking clues

2005-05-27 Thread Rhino
If you're a newbie to MySQL, you'll certainly benefit from reading the documentation at http://dev.mysql.com/doc/. If you're new to database design, there's a pretty good normalization tutorial at http://www.informit.com/articles/article.asp?p=30885&rl=1 Rhino - Original Message - From:

Re: Select MAX(column1,column2)

2005-05-27 Thread SGreen
Scott Klarenbach <[EMAIL PROTECTED]> wrote on 05/26/2005 04:25:22 PM: > Can I select the maximum value across multiple columns? > > ie, I'd like to select the highest value of buyCost AND sellCost in a > table...where buy and sell are two different columns in the same > table. > > i actually ha

Re: Cumulative Totals

2005-05-27 Thread doug
Just in case you did not follow this suggestion, if you are using 4.0.x this is very simple. I was looking for this: set @total:=0; select f1,f2,...,@total:[EMAIL PROTECTED] as Total from table where ...; is pretty simple. On Wed, 25 May 2005, Dan Bolser wrote: > On Wed, 25 May 2005, Russel

MySQL Migration Tool - who wrote it?

2005-05-27 Thread David Griffiths
This isn't exactly the right spot, but I can't find any info on the MySQL web site. Anyone know who maintains the MySQL Migration Tool (or who is developing it, as it is currently Apha)? It does not support Orace 8i (9i and 10g only), but I've looked through the source code, and it's not a h

RE: No Longer Receiving Emails

2005-05-27 Thread Tucker, Gabriel
Thanks - now I am getting emails from the list.. Gabe -Original Message- From: Cummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED] Sent: Friday, May 27, 2005 2:39 PM To: Tucker, Gabriel Subject: Re: No Longer Receiving Emails You are sending messages without error, it would appear. --

Re: Select MAX(column1,column2)

2005-05-27 Thread Keith Ivey
Scott Klarenbach wrote: Can I select the maximum value across multiple columns? You want the GREATEST() function: http://dev.mysql.com/doc/mysql/en/comparison-operators.html -- Keith Ivey <[EMAIL PROTECTED]> Smokefree DC http://www.smokefreedc.org Washington, DC -- MySQL General Mailing Lis

Re: MySQL preg_split functionality?

2005-05-27 Thread SGreen
I have a hard time figuring out when you would use such a function. I do not believe you will be able to duplicate this behavior without constructing your own UDF or by writing a stored procedure. BTW, why *do* you want this function? Shawn Green Database Administrator Unimin Corporation - Spru

Re: how to optimize this query

2005-05-27 Thread SGreen
Kevin Weslowski <[EMAIL PROTECTED]> wrote on 05/26/2005 02:20:46 AM: > Hi, > > I've got a query that I believe should be giving me better performance > than it is, since I've put indexes on all the appropriate columns...I'll > include as much info as I can for anyone wishing to help me optimiz

Using MySQL to store/archive code/html etc?

2005-05-27 Thread zzapper
Hi, Today I designed a fairly cute error404.php page, which I'd like to reuse in future. Currently I rely on remembering that I created such a page for say ACME Carpets. Now and again my memory fails to remember which site I developed a piece of HTML,PHP,Perl,Javascript for and I spend more time

Re: No Longer Receiving Emails

2005-05-27 Thread Rob Cochrane
Works Rob Tucker, Gabriel wrote: Hi I have not received anything from this list for a couple of days. I just tried to "re-register", and that did not help. If anyone reads this, please reply to ME so I can determine if the problem is with my account or with the list. Thanks Gabe <><><>

Re: Mysql Preg_split functionality

2005-05-27 Thread Scott Klarenbach
Here's what I came up with in case anyone else needs a quick fix. A regular expression replace would've been nicer, but, you do what you gotta do... CREATE PROCEDURE `test`(`par` varchar(60)) BEGIN DECLARE nChars INT DEFAULT CHAR_LENGTH(par); DECLARE nCounter INT DEFAULT 1;

RE: No Longer Receiving Emails

2005-05-27 Thread Jay Blanchard
I saw this on this list, so it is getting there just fine. -Original Message- From: Tucker, Gabriel [mailto:[EMAIL PROTECTED] Sent: Friday, May 27, 2005 10:03 AM To: Mysql General (E-mail) Subject: No Longer Receiving Emails Hi I have not received anything from this list for a couple o

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

2005-05-27 Thread Qunfeng
No, I didn't shut down mysqld or read lock. Would you please elaborate it a little more on why? Thanks a lot! Qunfeng At 01:05 PM 5/27/2005, Eric Bergen wrote: Did you shut down mysqld or read lock before copying the table? Qunfeng wrote: Hi, I am running MySQL 4.1.8-Max-log on two Linux m

combining rows

2005-05-27 Thread Marcel Meyer
Hello list, I've got a query problem with MySQL 4._0_. A specific SELECT will give me a result set with two columns, an ID and an information. Now I want to group all results by their ID. Speak: In the result there should be only one row per ID but the informations from the different rows shal

Re: how can I install mysql without administrator priviledge

2005-05-27 Thread Gleb Paharenko
Hello. >--default-file=/home/jesse/mysql/my-large.cnf to run the server but it ^ There's 's' at the end, use --defaults-file. >I have tried to use ./mysqld_safe >--default-file=/home/jesse/mysql/my-large.cnf to run the server but it >doesn't w

Re: restarting mysql server

2005-05-27 Thread Gleb Paharenko
Hello. It looks like the path is wrong. Find out the correct value from /etc/init.d/mysql file and put it in the configuration file. >Hi, >I check my.cnf configure file. I find Pid-file path is >/var/run/mysqld/mysqld.pid, but I couldn't find mysqld directory in >/var/run and couldn't

Re: won't start on fedora core 3--kernel errors?

2005-05-27 Thread Gleb Paharenko
I want it to be on the list for feature requests. The final solution which helped was adding mysqld_disable_trans=1 to /etc/selinux/targeted/booleans and reboot. Gleb Paharenko <[EMAIL PROTECTED]> wrote: > Hello. > > Disable or change policies of SELinux. > -- For techni

Select MAX(column1,column2)

2005-05-27 Thread Scott Klarenbach
Can I select the maximum value across multiple columns? ie, I'd like to select the highest value of buyCost AND sellCost in a table...where buy and sell are two different columns in the same table. i actually have 4 comparisons to run, and don't want to have to execute 4 queries. -- MySQL Genera

4.0 -> 4.1 undocumented incompatible change w/float?

2005-05-27 Thread Don MacAskill
I've already opened a support ticket with MySQL on this issue, but thought someone here might know the answer, too: Hi there, I'm trying to make sure I'm not doing something stupid. I'm trying to migrate from 4.0 to 4.1, but I'm hitting a snag. I can't find anything in the docs to describe

4.0 -> 4.1 undocumented incompatible change w/float?

2005-05-27 Thread Don MacAskill
I've already opened a support ticket with MySQL on this issue, but thought someone here might know the answer, too: Hi there, I'm trying to make sure I'm not doing something stupid. I'm trying to migrate from 4.0 to 4.1, but I'm hitting a snag. I can't find anything in the docs to describe

Re: auto_increment trouble (not the usual check || alter table solution, though)

2005-05-27 Thread Ricardo Oliveira
On 5/16/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > with a similar structure, you can have : > mysql> select * from users where uid >=262140; > ++--+ > | uid| nickname | > ++--+ > | 262140 | text | > | 262141 | text | > | 262142 | text |

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

2005-05-27 Thread Eric Bergen
Did you shut down mysqld or read lock before copying the table? Qunfeng wrote: Hi, I am running MySQL 4.1.8-Max-log on two Linux machine (machine A and machine B). In the past, I do a simple scp to transfer all the database table file from one machine (A) to the other (B). After the transf

Re: how to optimize this query

2005-05-27 Thread Kevin Weslowski
Well, it seems you've helped solve my problem, Shawn...here we go: first off, sorry about the text wrapping and the sloppy sql...I do get lazy sometimes...I am a programmer :P you asked how fast this runs: SELECT ind_first_name , ind_last_name , fam_phone , max(iat_dat

MySQL preg_split functionality?

2005-05-27 Thread Scott Klarenbach
I'm trying to replicate this PHP behavior in a MySQL stored procedure. The purpose is to pad every character of the string with a pad character. For example, if the pad character is 'x' and the string is 'STRING', the result is 'xSxTxRxIxNxGx'. Here is the PHP code if it helps. I'd like to use

No Longer Receiving Emails

2005-05-27 Thread Tucker, Gabriel
Hi I have not received anything from this list for a couple of days. I just tried to "re-register", and that did not help. If anyone reads this, please reply to ME so I can determine if the problem is with my account or with the list. Thanks Gabe <><><><><><><><><><><><><><><><><><><><><> "T

Test - please ignore

2005-05-27 Thread Tucker, Gabriel
Just a test - thanks <><><><><><><><><><><><><><><><><><><><><> "There are no problems, only solutions." Gabe Tucker Bloomberg LP (609) 750 6668 - P (646) 268 5681 - F <><><><><><><><><><><><><><><><><><><><><> -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To un

[ANN]: DBACentral for MySQL v1.6 has been released

2005-05-27 Thread Edward . Smirnov
Hello, The new version of DBACentral for MySQL has been released. DBACentral v1.6 presents powerful report building functionality, query-based forms, reports and web pages, lookup fields showing multiple column values, and other improvements Download the new version of DBACentral for MySQL righ

Re: problem when running mysql server

2005-05-27 Thread gerald_clark
qin lei wrote: > I have instal mysql in /usr/local/mysql. When I run the server. The > message showed on the screen is as follows: > > [EMAIL PROTECTED] bin]# ./safe_mysqld & > [1] 5122 > [EMAIL PROTECTED] bin]# Starting mysqld daemon with databases from > /var/lib/mysql > STOPPING server from pid

Just a test

2005-05-27 Thread Berman, Mikhail
Mikhail Berman

newbie desperately seeking clues

2005-05-27 Thread Kirk Bailey
Folks, I am EW to the list, and MYsql. I am totally adrift, and looking for some good reading for a raw beginner. PLEASE post some linke for my use. I remain, Kirk Bailey think - | THE BOX | - kniht Defend fre

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

2005-05-27 Thread Qunfeng
Hi, I am running MySQL 4.1.8-Max-log on two Linux machine (machine A and machine B). In the past, I do a simple scp to transfer all the database table file from one machine (A) to the other (B). After the transferring, the table on B works well. However, I am encountering a problem with tra

Re: Lost connection to MySQL server during query problem

2005-05-27 Thread Amir Shay
Hi, Yes the server dies during the queries from JDBC. Regarding the client parameters, what if the client doesn't have mySQL installed? Amir Hello. Does SHOW STATUS executed from JDBC client return increased values of this parameters? Could your server die during queries from JDBC (ch

Re: InnoDB to MyISAM

2005-05-27 Thread Jeremiah Gowdy
Nevertheless, foreign key constraints belong in the database, not in your application... If you have foreign keys (your wording), you need foreign key constraints. Period. Plain and simple. No discussion :-) How about a log database? We log every phone call to a calls table which currently has

Re: maximum size of mysql server-id field

2005-05-27 Thread Eric Bergen
It's 32 bit. I'm not sure if it's signed or not but chances are you don't need more than 2 billion ids :) Richard Lynch wrote: On Wed, May 25, 2005 11:59 pm, David said: Does anyone know what the range for server-id can be? Is it a 16 bit number? 32 bit? I can't seem to find it in the do