Count of multiple columns

2005-05-07 Thread Micha Berdichevsky
Hi. I have a table that store different items. For each items, I can attach up to 5 different textual categories. Those categories are free-text, and different columns can have the same values (example below). I am trying to select the count of each of those categories, regardless of it's positi

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Dan Nelson
In the last episode (May 07), Atle Veka said: > On Fri, 6 May 2005, Kevin Burton wrote: > > For the record... no a loaded system what type of IO do you guys > > see? Anywhere near full disk capacity? I'm curious to see what > > type of IO people are seeing on a production/loaded mysql box. > > Mo

Trouble compiling 5.0.4-beta with openssl

2005-05-07 Thread mark arquette
Hi. My attempts to compile mysql-5.0.4-beta on Solaris 9 (Sparc) fail when I run make with the following: if gcc -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER -I. -I. -I../.. -I../../include -I../../include-O3 -DDBUG_OFF -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -

Re: myisamchk and myisampack

2005-05-07 Thread Gleb Paharenko
Hello. There're some good descriptions at: http://dev.mysql.com/doc/mysql/en/crash-recovery.html http://dev.mysql.com/doc/mysql/en/myisampack.html [EMAIL PROTECTED] wrote: > Hello everyone, > When running these utilities does the MySQL daemon have to be "down"? > There's no activ

Re: ERROR 1063 (4200) when trying to drop a user

2005-05-07 Thread Gleb Paharenko
Hello. Revoke all privileges first. Eric Wagar <[EMAIL PROTECTED]> wrote: > I am trying to drop a user via: > mysql> drop user 'wiki_user'; > ERROR 1268 (HY000): Can't drop one or more of the requested users > > The relevant user table: > mysql> select host,user from user; > +

Re: couldn't drop column in Innodb table

2005-05-07 Thread Gleb Paharenko
Hello. What was the error? How was it related to the size problem? What 'SHOW INNODB STATUS' says? TT <[EMAIL PROTECTED]> wrote: > I use "alter table tbl_name drop col_name" but failed. > The table has 20 million rows, and this turns out to > be a size problem. appreciate any suggesti

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Atle Veka
On Sat, 7 May 2005, Kevin Burton wrote: > It looks like you're saying here that a single disk is FASTER than your > RAID 10 setup. > > Correct? > > Which is interesting. I'm wondering if this is a RAID config issue. It > just seems to make a LOT more sense that RAID 1 or 10 would be faster > tha

User variables in UPDATEs vs. SELECTs

2005-05-07 Thread Chris
I've got a table (pages) with an order column (pages.iOrder) and and grouping column (pages.iCategoryID). The order column is just a SMALLINT UNSIGNED column, that should contain the values 1-n for each iCategoryID. These are used to order the rows in each category. I'm in the process of writi

Re: amPiguous!

2005-05-07 Thread Jochem van Dieten
On 5/7/05, Dan Bolser wrote: > On Sat, 7 May 2005, Jochem van Dieten wrote: >>On 5/7/05, Dan Bolser wrote: >> >>> select pk from a inner join b using (pk); >>> >>> ERROR 1052 (23000): Column 'pk' in field list is ambiguous!!! >>> >>> Is this a bug, or is it like this for a reason? It drives me nu

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Kevin Burton
Atle Veka wrote: On Fri, 6 May 2005, Kevin Burton wrote: For the record... no a loaded system what type of IO do you guys see? Anywhere near full disk capacity? I'm curious to see what type of IO people are seeing on a production/loaded mysql box. Mostly Linux in this thread so far, so I f

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Atle Veka
On Fri, 6 May 2005, Kevin Burton wrote: > For the record... no a loaded system what type of IO do you guys see? > Anywhere near full disk capacity? I'm curious to see what type of IO > people are seeing on a production/loaded mysql box. Mostly Linux in this thread so far, so I figured I'd throw

Client-side subqueries MUCH faster than server-side queries... DESIGN flaw!

2005-05-07 Thread Kevin Burton
So I think we all need to admit that using IN clauses with subqueries on MySQL 4.1.x is evil. Pure evil. I attached the blog post I made on the subject a while back. (my blog is offline) If you KNOW ahead of time that your subquery involves only a few columns, then just rewriting the query t

Re: SELECT DISTINCT ROW(A,B) ?

2005-05-07 Thread Dan Bolser
On Sat, 7 May 2005, Roger Baklund wrote: >Dan Bolser wrote: >> SELECT DISTINCT ROW(A,B) from a; >> >> While I am on a roll (of sorts) can I ask if the above syntax should be >> valid or not? > >If you mean the exact syntax above, I think not... it looks like ROW() >is a function taking two para

Re: SELECT DISTINCT ROW(A,B) ?

2005-05-07 Thread Roger Baklund
Dan Bolser wrote: SELECT DISTINCT ROW(A,B) from a; While I am on a roll (of sorts) can I ask if the above syntax should be valid or not? If you mean the exact syntax above, I think not... it looks like ROW() is a function taking two parameters in this case... what does the function return? Is it

Re: MySQL not using optimum disk throughput.

2005-05-07 Thread Greg Whalin
Hi Peter, As for reporting bugs ... http://bugs.mysql.com/bug.php?id=7437 http://bugs.mysql.com/bug.php?id=10437 We have found Opteron w/ Mysql to be an extremely buggy platform, especially under linux 2.6, but granted, we are running Fedora. Perhaps we will try Suse, but I feel I have heard sim

Re: amPiguous!

2005-05-07 Thread Dan Bolser
On Sat, 7 May 2005, Jochem van Dieten wrote: >On 5/7/05, Dan Bolser wrote: >> >> Why are columns included in the join between two tables ambigious? > >Because MySQL does not follow the SQL standard (ISO/IEC 9075-2:2003). > > >> select pk from a inner join b using (pk); >> >> ERROR 1052 (23000):

SELECT DISTINCT ROW(A,B) ?

2005-05-07 Thread Dan Bolser
SELECT DISTINCT ROW(A,B) from a; While I am on a roll (of sorts) can I ask if the above syntax should be valid or not? I have a feeling it should be valid (but isn't - it causes an error). Is this the correct behaviour? -- MySQL General Mailing List For list archives: http://lists.mysql.co

Re: amPiguous!

2005-05-07 Thread Jochem van Dieten
On 5/7/05, Chris wrote: > Somethign else to think about as well, look at this slight modification: > > select pk from a left join b using (pk); > > > Now, it's not likely this is a valid query for your table structure It is very likely it is. It is even an example in the MySQL manual. > but,

Re: amPiguous!

2005-05-07 Thread Jochem van Dieten
On 5/7/05, Dan Bolser wrote: > > Why are columns included in the join between two tables ambigious? Because MySQL does not follow the SQL standard (ISO/IEC 9075-2:2003). > select pk from a inner join b using (pk); > > ERROR 1052 (23000): Column 'pk' in field list is ambiguous!!! > > Is this a

RE: Data Design : Numeric or keyword lookup values?

2005-05-07 Thread Charles Walmsley
One issue you have to consider is how the data is entered. If the user selects from a drop down list then this is ok but you need to plan how the drop down list is compiled. If not then you need to thinks about spelling errors, language issues etc. Charles Walmsley -Original Message- Fro

Re: amPiguous!

2005-05-07 Thread Joerg Bruehe
Hi! Dan Bolser wrote: [[...]] I would have said... select pk from a inner join b on a.pk = b.pk; (probably pk was a bad choice for an example column name). Using the ON syntax instead of the USING syntax makes my problem look even more silly than it already is, i.e. just say select a.pk from a inne

Re: Problem compiling mysql 4.1.11 on AIX 5.1

2005-05-07 Thread Joerg Bruehe
Hi! Jon Earle wrote: Hi all! I'm having trouble building the latest stable on AIX 5.1. My env is as follows: Relevant GNU tools: [[...]] gcc-3.3.2-4.aix5.1.ppc.rpm [[...]] I admit I did not use gcc on AIX for quite some time. Results in the following error: ... checking term.h usability... no che