Re: Query interruption with MySQL 5.7 using KILL QUERY in signal handler does no more work

2016-07-12 Thread Sebastien FLAESCH
I did the following test: My program still uses MySQL 5.7 libmysqlclient.so, but I connect now to a 5.6.16 server. And the SQL interrupt works fine... so I suspect there is a MySQL server issue in 5.7. Seb On 07/12/2016 01:01 PM, Sebastien FLAESCH wrote: About: > B) For some reason, the p

Re: Query interruption with MySQL 5.7 using KILL QUERY in signal handler does no more work

2016-07-12 Thread Sebastien FLAESCH
About: > B) For some reason, the program does not want to exit() - (must investigate) In fact we use prepared statements with a sequence of mysql_stmt_init, mysql_stmt_prepare, mysql_stmt_execute, mysql_stmt_fetch, ... and mysql_stmt_close. After the statement was interrupted, we try to free th

Query interruption with MySQL 5.7 using KILL QUERY in signal handler does no more work

2016-07-03 Thread Sebastien FLAESCH
Hi all, I use the following technique to cancel a long running query: In the SIGINT signal handler, I restart a connection and I perform a KILL QUERY mysql-process-id-of-running-query This was working find with MySQL 5.6. But with 5.7 (5.7.11), we get now a different result: A) The query

Re: Big innodb tables, how can I work with them?

2014-05-19 Thread Antonio Fernández Pérez
​Hi, Thanks for your replies. In our case, we can't implement NOSQL solution. Thats requires modify/check all our application and all services (Including FreeRADIUS that I'm not sure if it's compatible). Andrew, I have heard about people that has a lot of data, more than me. I know that MySQL su

Re: Big innodb tables, how can I work with them?

2014-05-19 Thread Andrew Moore
What kind of queries is this table serving? 8GB is not a huge amount of data at all and IMO it's not enough to warrant sharding. On Thu, May 15, 2014 at 1:26 PM, Antonio Fernández Pérez < antoniofernan...@fabergroup.es> wrote: > ​ > > ​ > ​Hi, > > I have in my server database some tables that ar

Re: Big innodb tables, how can I work with them?

2014-05-19 Thread Manuel Arostegui
2014-05-19 11:49 GMT+02:00 Johan De Meersman : > > - Original Message - > > From: "Manuel Arostegui" > > Subject: Re: Big innodb tables, how can I work with them? > > > > noSQL/table sharding/partitioning/archiving. > > I keep wondering how

Re: Big innodb tables, how can I work with them?

2014-05-19 Thread Johan De Meersman
- Original Message - > From: "Manuel Arostegui" > Subject: Re: Big innodb tables, how can I work with them? > > noSQL/table sharding/partitioning/archiving. I keep wondering how people believe that NoSQL solutions magically don't need RAM to work. Nearly

Re: Big innodb tables, how can I work with them?

2014-05-18 Thread Manuel Arostegui
2014-05-15 14:26 GMT+02:00 Antonio Fernández Pérez < antoniofernan...@fabergroup.es>: > ​ > > ​ > ​Hi, > > I have in my server database some tables that are too much big and produce > some slow query, even with correct indexes created. > > For my application, it's necessary to have all the data be

Re: Advices for work with big tables

2014-05-16 Thread shawn l.green
date, total minutes connected for that date, total number of connections for that day, ... ) then you have reduced how much work your weekly report needs to do from 7 rows to just 7. How much faster would that be? Each day, you add the previous day's totals to your summary tables.

Re: Advices for work with big tables

2014-05-16 Thread Johan De Meersman
- Original Message - > From: "Antonio Fernández Pérez" > Subject: Advices for work with big tables > > Hi, > > I write to the list because I need your advices. > > I'm working with a database with some tables that have a lot of rows, for &g

Re: Advices for work with big tables

2014-05-16 Thread Reindl Harald
s table? > > My server works with disk cabin and I think that sharding and partitioning > are technologies that not applies. Work with a lot of data produces that > there are some slow query, even with the correct indexes created. > > So, one option is to delete data but, I

Advices for work with big tables

2014-05-16 Thread Antonio Fernández Pérez
oning are technologies that not applies. Work with a lot of data produces that there are some slow query, even with the correct indexes created. So, one option is to delete data but, I use a RADIUS system to authenticate and authorize users to connect to Internet. For this reason I need work with a

Re: Big innodb tables, how can I work with them?

2014-05-15 Thread Reindl Harald
Am 15.05.2014 14:26, schrieb Antonio Fernández Pérez: > I have in my server database some tables that are too much big and produce > some slow query, even with correct indexes created. > > For my application, it's necessary to have all the data because we make an > authentication process with RA

Big innodb tables, how can I work with them?

2014-05-15 Thread Antonio Fernández Pérez
​ ​ ​Hi, I have in my server database some tables that are too much big and produce some slow query, even with correct indexes created. For my application, it's necessary to have all the data because we make an authentication process with RADIUS users (AAA protocol) to determine if one user can

pt-table-checksum: --ignore-tables-regex does not work properly?

2013-09-23 Thread Rafał Radecki
,test.z_import_prices_mdk,test.z_import_prices_sku,test.z_import_translations,test.z_import_translations_model --recursion-method dsn=h=localhost,D=percona,t=dsns --user=percona --password=percona --nocheck-replication-filters --databases=test,mysql localhost But it does not work, for example table

Re: mysql table hidden while operation on it still work

2013-03-08 Thread frederic nivor
when I : show databases; I got: ++ | Database | ++ | information_schema | | Applications | | Developer | | Library| | System | | bin| | cores | | etc| | private

Re: mysql table hidden while operation on it still work

2013-03-08 Thread Reindl Harald
Am 08.03.2013 17:32, schrieb frederic nivor: > when I : > show databases; > I got: > ++ > | Database | > ++ > | information_schema | > | Applications | > | Developer | > | Library| > | System | > | bin

Re: mysql table hidden while operation on it still work

2013-03-08 Thread frederic nivor
I've just installed the mysql, and its default database (mysql and performance_schema), so I connect with: mysql -u root Initialy there is not password. and when I : show grants for 'root'@'localhost'; I got : GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION GRANT PROXY ON ''@''

Re: mysql table hidden while operation on it still work

2013-03-08 Thread Reindl Harald
Am 08.03.2013 15:53, schrieb frederic nivor: > I use mysql-5.6.10 on a cross-platform. > when I : > use mysql; > I got : > ERROR 1049 (42000): Unknown database 'mysql' > but when I : > select User,Host,Password from mysql.user; > I got the right results. > Did I do something wrong in configurati

Help making tablespaces work for my application

2011-06-23 Thread Natusch, Paul
I have an application for which data is being written to many disks simultaneously. I would like to use a MySQL table space on each disk. If one of the disks crashes it is tolerable to lose that data, however, I must continue to write to the other disks.My specific concerns are around the r

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-26 Thread Daniel Kraft
On 04/26/11 05:32, Halász Sándor wrote: 2011/04/25 18:45 +, Larry McGhaw CREATE VIEW `myview2` AS SELECT a.*, IF(b.`Name` IS NULL, '', b.`Name`) AS `TypeName` FROM `mytable` a LEFT JOIN `types` b ON a.`Type` = b.`ID`; Well, for this construct IF(b.`N

RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-26 Thread Hal�sz S�ndor
2011/04/25 18:45 +, Larry McGhaw CREATE VIEW `myview2` AS SELECT a.*, IF(b.`Name` IS NULL, '', b.`Name`) AS `TypeName` FROM `mytable` a LEFT JOIN `types` b ON a.`Type` = b.`ID`; Well, for this construct IF(b.`Name` IS NULL, '', b.`Name`) there is a spe

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-25 Thread Daniel Kraft
Hi, On 04/25/11 20:45, Larry McGhaw wrote: My best advice is to not use a custom MySQL function in a view when the parameter to that function is a column or expression that has the potential to result in NULL because of being on the right side of a left outer join (or the left side of a right

RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-25 Thread Larry McGhaw
11 2:03 PM To: Larry McGhaw Cc: Daevid Vincent; mysql@lists.mysql.com Subject: Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body On 04/22/11 22:41, Larry McGhaw wrote: > It does appear to be some type of bug to me. Hm... do you have an idea how to wo

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-24 Thread Daniel Kraft
On 04/22/11 22:41, Larry McGhaw wrote: It does appear to be some type of bug to me. Hm... do you have an idea how to work around this bug then? Yours, Daniel Clearly from the select, the Typename field is not null, as shown here. mysql> SELECT *, TypeName Is NULL, TypeName IS NOT N

Re: WHERE does not work on calculated view field

2011-04-23 Thread Daniel Kraft
Hi, thanks for the answer! On 04/23/11 11:33, ars k wrote: Could you check the 'myview' once again? I think you thought to create the view as follows: " CREATE VIEW `myview2` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS `TypeName`FROM `mytable` a LEFT JOIN `types` b ON *a.ID* *= b.`ID`*;

Re: WHERE does not work on calculated view field

2011-04-23 Thread ars k
Hi Daniel, Could you check the 'myview' once again? I think you thought to create the view as follows: " CREATE VIEW `myview2` AS SELECT a.*, EMPTY_STRING(b.`Name`) AS `TypeName`FROM `mytable` a LEFT JOIN `types` b ON *a.ID* *= b.`ID`*; " Now your select queries will give results as fol

Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-22 Thread Carsten Pedersen
On 22.04.2011 22:41, Larry McGhaw wrote: It does appear to be some type of bug to me. I agree. I was thrown by Daniels "first and third" comment, which I guess should read "second and third" I reproduced the behavior in 5.1.53-community on Windows. / Carsten -- MySQL General Mailing List F

RE: WHERE does not work on calculated view field - Found word(s) list error in the Text body

2011-04-22 Thread Larry McGhaw
mysql@lists.mysql.com Subject: Re: WHERE does not work on calculated view field - Found word(s) list error in the Text body Hi, thanks for the fast reply! On 04/22/11 21:39, Daevid Vincent wrote: >> DROP DATABASE `test`; >> CREATE DATABASE `test`; >> USE `test`; >> >> CREATE

Re: WHERE does not work on calculated view field

2011-04-22 Thread Daniel Kraft
Hi Carsten, On 04/22/11 22:11, Carsten Pedersen wrote: On 22.04.2011 21:37, Daniel Kraft wrote: DROP DATABASE `test`; CREATE DATABASE `test`; USE `test`; CREATE TABLE `mytable` (`ID` SERIAL, `Type` INTEGER UNSIGNED NULL, PRIMARY KEY (`ID`)); INSERT INTO `mytable` (`Type`) VALUES (NULL); CREAT

Re: WHERE does not work on calculated view field

2011-04-22 Thread Carsten Pedersen
On 22.04.2011 21:37, Daniel Kraft wrote: Hi all, I'm by no means a (My)SQL expert and just getting started working with VIEWs and stored procedures, and now I'm puzzled by this behaviour: DROP DATABASE `test`; CREATE DATABASE `test`; USE `test`; CREATE TABLE `mytable` (`ID` SERIAL, `Type` INTE

Re: WHERE does not work on calculated view field

2011-04-22 Thread Daniel Kraft
Hi, thanks for the fast reply! On 04/22/11 21:39, Daevid Vincent wrote: DROP DATABASE `test`; CREATE DATABASE `test`; USE `test`; CREATE TABLE `mytable` (`ID` SERIAL, `Type` INTEGER UNSIGNED NULL, PRIMARY KEY (`ID`)); INSERT INTO `mytable` (`Type`) VALUES (NULL); CREATE TABLE `t

RE: WHERE does not work on calculated view field

2011-04-22 Thread Daevid Vincent
> -Original Message- > From: Daniel Kraft [mailto:d...@domob.eu] > Sent: Friday, April 22, 2011 12:37 PM > To: mysql@lists.mysql.com > Subject: WHERE does not work on calculated view field > > Hi all, > > I'm by no means a (My)SQL expert and just gett

WHERE does not work on calculated view field

2011-04-22 Thread Daniel Kraft
Hi all, I'm by no means a (My)SQL expert and just getting started working with VIEWs and stored procedures, and now I'm puzzled by this behaviour: DROP DATABASE `test`; CREATE DATABASE `test`; USE `test`; CREATE TABLE `mytable` (`ID` SERIAL, `Type` INTEGER UNSIGNED NULL, PRIMARY KEY (

RE: mysqlimport doesn't work for me

2011-01-03 Thread Jerry Schwartz
>-Original Message- >From: Carsten Pedersen [mailto:cars...@bitbybit.dk] >Sent: Monday, January 03, 2011 1:48 PM >To: Jerry Schwartz >Cc: 'mos'; mysql@lists.mysql.com >Subject: Re: mysqlimport doesn't work for me > >It's been a long time sine I

Re: mysqlimport doesn't work for me

2011-01-03 Thread Carsten Pedersen
-+--++ 4 rows in set (0.03 sec) This does not work: localhost>TRUNCATE t_dmu_history; localhost>quit C:\Users\Jerry\Documents\Access MySQL Production>mysqlimport --columns=`dm_history_dm_id`,`dm_history_customer_i

mysqlimport doesn't work for me

2011-01-03 Thread Jerry Schwartz
3071 | 299522 | +--+--++ 4 rows in set (0.03 sec) ==== This does not work: localhost >TRUNCATE t_dmu_history; localhost >quit C:\Users\Jerry\Documents\Access MySQL Production>mysqlimport --columns=`dm_history_dm_id`,`dm_history_customer_id` --fields-t

RESET MASTER doesn't work

2010-08-12 Thread Joe Hammerman
Hello MySQL-users list, We are having an issue with replication and binlog files and I was hoping that this list could shed a little light on the issue for us. We have a pair of 5.1.41-community MySQL servers. We attempted to restore from the slave server, and in the process I zeroed out the my

More Tools to Work with MySQL Databases in Visual Studio Provided by dbForge Fusion!

2010-07-27 Thread Julia Samarska
Devart Email: i...@devart.com Web: http://www.devart.com FOR IMMEDIATE RELEASE CONTACT INFORMATION: Julia Samarska jul...@devart.com 27-Jul-2010 More Tools to Work with MySQL Databases in Visual Studio Provided by dbForge Fusion! Devart today releases dbForge Fusion for MySQL

More Tools to Work with MySQL Databases Provided by dbForge Studio!

2010-07-12 Thread Julia Samarska
Devart Email: i...@devart.com Web: http://www.devart.com FOR IMMEDIATE RELEASE CONTACT INFORMATION: Julia Samarska jul...@devart.com 12-Jul-10 More Tools to Work with MySQL Databases Provided by dbForge Studio! With dbForge Studio for MySQL, Devart continues its initiative to produce

Tab Ahead Doesn't Work As User

2010-05-28 Thread Carlos Mennens
Is it normal behavior for MySQL command type ahead not to work unless you have a database selected? I notice that using the tab 'type ahead' has no response unless I use a specific database. Is this normal behavior? -- MySQL General Mailing List For list archives: http://lists.mysql.co

Re: max() can't work

2010-02-06 Thread Jim Lyons
Why in the world would you think "select * from table_name group by movid having max(movid)" would work? It seems to compile without errors but doesn't give you what you seem to want. This would work: select * from table_name group by movid having movid = (select max(movid)

Re: max() can't work

2010-02-06 Thread Vikram A
:28:06 PM Subject: Re: max() can't work The max() function is an aggregate function which can be used in conjunction with GROUP BY in the SELECT or HAVING clause: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html . This code should work: select * from table_name group by

Re: max() can't work

2010-02-06 Thread Jim Lyons
Yes - you must use the subselect. Or, you can set a variable like: select @max := max(movid) from table_name; select * from table_name where movid = @max; On Sat, Feb 6, 2010 at 8:34 AM, tech list wrote: > select * from table_name where movid = max(movid); > > why the sql above c

Re: max() can't work

2010-02-06 Thread Roland Kaber
The max() function is an aggregate function which can be used in conjunction with GROUP BY in the SELECT or HAVING clause: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html . This code should work: select * from table_name group by movid having max(movid). However, there is a

Re: max() can't work

2010-02-06 Thread armando
the field "movid" is type integer or varchar ? 2010/2/6 tech list > select * from table_name where movid = max(movid); > > why the sql above can't work? > Shall I use a sub-select instead? > > select * from table_name where movid = (select max(movid) fro

max() can't work

2010-02-06 Thread tech list
select * from table_name where movid = max(movid); why the sql above can't work? Shall I use a sub-select instead? select * from table_name where movid = (select max(movid) from table_name) ? Thanks in advance. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mys

MySQL 5.1 does not work on Mac OS X 10.5 Leopard and Power PC

2010-01-05 Thread Moishe Weiss
it installed (including the actual MySQL package, the startup package and the preference pane). However it did not work right. The preference pane caused Preferences.app to crash repeatedly, so I had to remove it. mysql, mysqld and mysqladmin all return "bad CPU type in executable".

Re: Rename Database - Why Would This Not Work?

2009-11-23 Thread Rob Wultsch
On Mon, Nov 23, 2009 at 7:37 AM, Johan De Meersman wrote: > You don't even need to stop the server afaik. As mentioned previously, > though, works for MyISAM only. > While this is strictly true there are some big caveats (flushing tables, etc). It is safer to shut down the database before moving

Re: Rename Database - Why Would This Not Work?

2009-11-23 Thread Johan De Meersman
ist in here, the whole statement will be applied to the > system atomically > > The database has 1200+ tables, so your approach seems like more work to > me. As it is, all I'm doing is: > > service mysql stop > mv olddb newdb > service mysql start > mysqlcheck -o ne

Re: Rename Database - Why Would This Not Work?

2009-11-23 Thread Jim Lyons
Does this work if any of the tables are InnoDB? On Mon, Nov 23, 2009 at 8:17 AM, Robinson, Eric wrote: > >RENAME TABLE > > olddb.table1 TO newdb.table1, > > olddb.table2 TO newdb.table2 > > >put the whole list in here, the whole statement will be applied to the

RE: Rename Database - Why Would This Not Work?

2009-11-23 Thread Robinson, Eric
>RENAME TABLE > olddb.table1 TO newdb.table1, > olddb.table2 TO newdb.table2 >put the whole list in here, the whole statement will be applied to the system atomically The database has 1200+ tables, so your approach seems like more work to me. As it is, all I'm doing is: s

Re: Rename Database - Why Would This Not Work?

2009-11-22 Thread Michael Dykman
Safer and much less work: since you have the luxury of stopping the server, stop it, restarting with skip-networking and log in from a local console which should guarantee that you are alone on the system. RENAME TABLE olddb.table1 TO newdb.table1, olddb.table2 TO newdb.table2 put the

Re: Rename Database - Why Would This Not Work?

2009-11-22 Thread Rob Wultsch
On Sat, Nov 21, 2009 at 2:43 PM, Robinson, Eric wrote: > > DB engines that have their own data dictionary (Innodb, etc) in > addition to > > what is in the .frm could easily be messed up. > Like I said, there are only MyISAM tables in the database, so would there > be any risks associated with my

RE: Rename Database - Why Would This Not Work?

2009-11-21 Thread Robinson, Eric
> DB engines that have their own data dictionary (Innodb, etc) in addition to > what is in the .frm could easily be messed up. Like I said, there are only MyISAM tables in the database, so would there be any risks associated with my simple approach? (Also there are no stored procedures because

Re: Rename Database - Why Would This Not Work?

2009-11-21 Thread Rob Wultsch
ng about lots of different ways to do a database > rename, and people are making it sound like a complicated, dangerous > procedure. > > Why would my simple approach not work? Should I be watching for > potential problems down the road because I did it this way? > > >

Rename Database - Why Would This Not Work?

2009-11-21 Thread Robinson, Eric
ause when I Google it, I see people talking about lots of different ways to do a database rename, and people are making it sound like a complicated, dangerous procedure. Why would my simple approach not work? Should I be watching for potential problems down the road because I did it this way? -- Er

RE: Natural Join Issue: column names are equal but doesn't work anyways

2009-08-25 Thread Gavin Towey
AND r.prov=c.prov AND r.cap=c.cap AND r.CodRappr=c.CodRappr; Regards, Gavin Towey -Original Message- From: Deviad [mailto:dev...@msn.com] Sent: Monday, August 24, 2009 6:27 PM To: mysql@lists.mysql.com Subject: Re: Natural Join Issue: column names are equal but doesn't work anyway

Re: Natural Join Issue: column names are equal but doesn't work anyways

2009-08-24 Thread muhammad subair
;,'Lansing','MI','49224',1817.5,2000,'03'); > insert into clienti > values > ('522','Nelson','Mary','108Pine','Ada','MI','49441',98.75,1500,'12'); > insert into clienti > values > (

Re: Natural Join Issue: column names are equal but doesn't work anyways

2009-08-24 Thread Deviad
6Elm','Lansing','MI','49224',1817.5,2000,'03'); > insert into clienti > values > ('522','Nelson','Mary','108Pine','Ada','MI','49441',98.75,1500,'12'); > insert into clienti > values > (

Natural Join Issue: column names are equal but doesn't work anyways

2009-08-24 Thread Deviad
75,1500,'12'); insert into clienti values ('567','Dinh','Tran','808Ridge','Harper','MI','48421',402.4,750,'06'); insert into clienti values ('587','Galvez','Mara','512

Tools on http://www.severalnines.com do not work.

2009-06-16 Thread Joshua Gordon
Hi List, I have been trying to use bencher and chkfrag from http://www.severalnines.com. But I continue to receive the following errors../chkfrag: error while loading shared libraries: /usr/local/mysql/lib/libndbclient.so.4: cannot restore segment prot after reloc: permission denie

Re: Cant get TRIM to work?

2009-04-17 Thread Jim Lyons
Works for me. I assume you're only trimming blanks from the beginning and/or end of the string. I have found that it will not trim tabs. Try a command like: select concat("'", trim(notes), "'") from work_notes On Fri, Apr 17, 2009 at 2:17 PM, Richard Reina wrote: > Hello All, > > I can't ge

Re: Cant get TRIM to work?

2009-04-17 Thread Curtis Maurand
http://www.mydigitallife.info/2007/04/23/remove-or-trim-first-or-last-few-characters-in-mysql-database-with-sql/ Richard Reina wrote: Hello All, I can't get trim to trim the blank space from a TEXT field in the query below and was wondering if someone could tell what I am doing wrong? SELECT

Cant get TRIM to work?

2009-04-17 Thread Richard Reina
Hello All, I can't get trim to trim the blank space from a TEXT field in the query below and was wondering if someone could tell what I am doing wrong? SELECT TRIM(notes) FROM work_notes; Thanks for any help as I am at a complete loss. Richard -- MySQL General Mailing List For list archives:

Re: Query from HPM book to limit rows scanned doesn't appear to work as described

2009-03-12 Thread Baron Schwartz
out that, the Handler_read_rnd_next variable was > zero in both cases. > > Before running each query, I ran "flush status", then the query, then "show > session status like 'Handler%'".  The first one had a value of 207 for > "Handler_read_rnd_next&q

Re: Query from HPM book to limit rows scanned doesn't appear to work as described

2009-03-12 Thread David M. Karr
Baron Schwartz wrote: Hi! On Wed, Mar 11, 2009 at 8:20 PM, David M. Karr wrote: Using 5.0.67-0ubuntu6 on Ubuntu 8.10. I'm going through the "High Performance MySQL" book. I was reading section 4.4.1.8, titled "MIN() and MAX()". The point of this is that MySQL doesn't optimize MIN()/MAX()

Re: Query from HPM book to limit rows scanned doesn't appear to work as described

2009-03-11 Thread Baron Schwartz
Hi! On Wed, Mar 11, 2009 at 8:20 PM, David M. Karr wrote: > Using 5.0.67-0ubuntu6 on Ubuntu 8.10. > > I'm going through the "High Performance MySQL" book.  I was reading section > 4.4.1.8, titled "MIN() and MAX()".  The point of this is that MySQL doesn't > optimize MIN()/MAX() very well, but it

Query from HPM book to limit rows scanned doesn't appear to work as described

2009-03-11 Thread David M. Karr
Using 5.0.67-0ubuntu6 on Ubuntu 8.10. I'm going through the "High Performance MySQL" book. I was reading section 4.4.1.8, titled "MIN() and MAX()". The point of this is that MySQL doesn't optimize MIN()/MAX() very well, but it showed a supposed workaround for this. The first sample query w

RE: Left join does not work with Count() as expected

2009-02-19 Thread Martin Gainty
t; From: mat...@itlegion.ru > To: mysql@lists.mysql.com > Subject: Left join does not work with Count() as expected > > I have two simple tables. One - list of forums, second - list of > messages and i want to > get the list of forums with number of messages in each. >

Re: Left join does not work with Count() as expected

2009-02-19 Thread Peter Brawley
>SELECT forums.id , COUNT( forum_msg.id ) AS cnt >FROM forums >LEFT JOIN forum_msg ON forums.id = forum_msg.forum_id >ORDER BY forums.sorder ASC Missing GROUP BY. PB - Artem Kuchin wrote: I have two simple tables. One - list of forums, second - list of messages and i want to get the list

Re: Left join does not work with Count() as expected

2009-02-19 Thread Olaf Stein
You need to group by forum_id... On 2/19/09 11:09 AM, "Artem Kuchin" wrote: > I have two simple tables. One - list of forums, second - list of > messages and i want to > get the list of forums with number of messages in each. > > Here is the query: > > SELECT forums.id , COUNT( forum_msg.id )

Left join does not work with Count() as expected

2009-02-19 Thread Artem Kuchin
I have two simple tables. One - list of forums, second - list of messages and i want to get the list of forums with number of messages in each. Here is the query: SELECT forums.id , COUNT( forum_msg.id ) AS cnt FROM forums LEFT JOIN forum_msg ON forums.id = forum_msg.forum_id ORDER BY forums.so

Re: Trying to work out why a join query is so slow

2009-02-02 Thread Baron Schwartz
each element of the > other table. It compounds the select statement. > You may try a Union.Im new to Mysql so im not sure it will work, but you > might try it out. > > SELECT * > FROM sites > INNER JOIN users ON sites.userid = users.ID > WHERE sites.email = 'per...@d

RE: Trying to work out why a join query is so slow

2009-02-01 Thread Martin Gainty
endorse content contained within this transmission. > Date: Sun, 1 Feb 2009 17:23:10 -0500 > Subject: Re: Trying to work out why a join query is so slow > From: ysn...@gmail.com > To: si...@internetstuff.ltd.uk > CC: mysql@lists.mysql.com > > My guess is that the OR i

Re: Trying to work out why a join query is so slow

2009-02-01 Thread Sangeetha
My guess is that the OR is searching the whole table for each element of the other table. It compounds the select statement. You may try a Union.Im new to Mysql so im not sure it will work, but you might try it out. SELECT * FROM sites INNER JOIN users ON sites.userid = users.ID WHERE sites.email

Trying to work out why a join query is so slow

2009-02-01 Thread Simon Kimber
Hi Everyone, I'm trying to run a very simple query on two joined tables but it's taking a long time to run. I have two tables, users and sites, both of which have an email address field that I'm querying. here's my query: SELECT * FROM sites INNER JOIN users ON sites.userid = users.ID

Re: What is the user account's password, Why is most of the things in the reference manual does not work as stated?

2008-10-04 Thread Fish Kungfu
Has the user been GRANTed PRIVILEGES yet? Look here for how to do that: http://dev.mysql.com/doc/refman/5.0/en/adding-users.html Cheers...Fish On Sat, Oct 4, 2008 at 12:36 PM, David Giragosian <[EMAIL PROTECTED]>wrote: > On Sat, Oct 4, 2008 at 11:33 AM, Varuna Seneviratna < > [EMAIL PROTECTE

Re: What is the user account's password, Why is most of the things in the reference manual does not work as stated?

2008-10-04 Thread David Giragosian
On Sat, Oct 4, 2008 at 11:33 AM, Varuna Seneviratna < [EMAIL PROTECTED]> wrote: > What is the user account's password.I used the command > C:\>mysql -u user -p > Enter password: ** > ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using > password: Y > ES) > How can I find i

What is the user account's password, Why is most of the things in the reference manual does not work as stated?

2008-10-04 Thread Varuna Seneviratna
What is the user account's password.I used the command C:\>mysql -u user -p Enter password: ** ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: Y ES) How can I find it? Varuna

Re: alter merge table doesn't work as documented (?)

2008-08-26 Thread Jim Lyons
PROTECTED] > Sent: Tuesday, August 26, 2008 4:41 PM > To: mysql > Subject: alter merge table doesn't work as documented (?) > > I have a merge table and dropped one of the tables that was in the union. > I > then tried to alter the merge table to use only the

RE: alter merge table doesn't work as documented (?)

2008-08-26 Thread Rolando Edwards
- From: Jim Lyons [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2008 4:41 PM To: mysql Subject: alter merge table doesn't work as documented (?) I have a merge table and dropped one of the tables that was in the union. I then tried to alter the merge table to use only the remaining t

alter merge table doesn't work as documented (?)

2008-08-26 Thread Jim Lyons
t3 (x int); create table t_merge (x int) engine=merge union=(t1,t2,t3); drop table t1; alter table t_merge union=(t2, t3); ## As I read the doc, this ought to work, leaving me with a merge table with only 2 tables in the union. The output I got was (the error message is

nested function does not work

2008-07-23 Thread Andrey Dmitriev
Is there are a reason why this wouldn't work? select upper( monarch.group_decode(lower(hg.alias)) ) from nagios.nagios_hostgroups hg; ++ | upper( monarch.group_decode(lower(hg.alias)) ) | ++ | dat

BACKUP DATABASE * TO '/tmp/all.backup'; - DOES NOT WORK (6.0.4-alpha)

2008-06-26 Thread Miguel Cardenas
p'' at line 1 Have tried 'BACKUP TABLE' but does not work either and documentation tells it has been removed... Any idea of what is going on? I've used and installed from sources MySQL since version 3.xx so it is not an installation problem, tried the './configure --help&

Re: CONCAT doesn't work with NULL?

2008-05-21 Thread Afan Pasalic
ne people saying do whatever you can using query in mysql rather then using php. it's faster, better, more secure,... thoughts? -afan Randall Price Secure Enterprise Technology Initiatives Microsoft Implementation Group Virginia Tech Information Technology 1700 Pratt Drive Blacksbu

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread 王旭
+ There are no result as you said. - Original Message - From: "Afan Pasalic" <[EMAIL PROTECTED]> To: "ewen fortune" <[EMAIL PROTECTED]> Cc: Sent: Thursday, May 15, 2008 12:52 AM Subject: Re: CONCAT doesn't work with NULL? > actuall

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Paul DuBois
n', r.email) FROM registrants r, addresses a WHERE r.reg_id=121 if any of columns has value (e.g. title) NULL, I'll get as result 0 records. If query doesn't have concat() - it works fine. Why is that? That's how CONCAT() is documented to work: http://dev.mysql.com/doc/refm

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread wim . delvaux
On Wednesday 14 May 2008 18:52:20 Afan Pasalic wrote: > actually, this will not work for me (or I got it wrong :D) because I > need to have street, state and zip in one line and with separator > defined on the beginning it will put everything in separate lines. Use a 'space'

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Afan Pasalic
actually, this will not work for me (or I got it wrong :D) because I need to have street, state and zip in one line and with separator defined on the beginning it will put everything in separate lines. :D ewen fortune wrote: Hi Afan, You can use concat_ws http://dev.mysql.com/doc/refman

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Afan Pasalic
addresses a WHERE r.reg_id=121 Randall Price Secure Enterprise Technology Initiatives Microsoft Implementation Group Virginia Tech Information Technology 1700 Pratt Drive Blacksburg, VA 24060 -Original Message- From: Afan Pasalic [mailto:[EMAIL PROTECTED] Sent: Wednesday,

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Afan Pasalic
Thanks Ewen, that's what I was looking for! :D -afan ewen fortune wrote: Hi Afan, You can use concat_ws http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws --- CONCAT() returns NULL if any argument is NULL. CONCAT_WS() does not skip empty strings. However, it does

RE: CONCAT doesn't work with NULL?

2008-05-14 Thread Price, Randall
24060 -Original Message- From: Afan Pasalic [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 14, 2008 11:53 AM To: mysql@lists.mysql.com Subject: CONCAT doesn't work with NULL? hi, I have query SELECT CONCAT(r.first_name, ' ', r.last_name, '\n', r.organization, &#

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread wim . delvaux
On Wednesday 14 May 2008 18:02:42 Olexandr Melnyk wrote: > It doesn't return no rows, it returns row(s) with a single column set to a > NULL value. In case one of the arguments is NULL, CONCAT() will return > NULL. > > To replace the value of one of the fields with an empty string when it's > NULL,

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread ewen fortune
Hi Afan, You can use concat_ws http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws --- CONCAT() returns NULL if any argument is NULL. CONCAT_WS() does not skip empty strings. However, it does skip any NULL values after the separator argument --- Ewen On Wed, May 14, 2

Re: CONCAT doesn't work with NULL?

2008-05-14 Thread Olexandr Melnyk
It doesn't return no rows, it returns row(s) with a single column set to a NULL value. In case one of the arguments is NULL, CONCAT() will return NULL. To replace the value of one of the fields with an empty string when it's NULL, you can use something like: CONCAT(COAESCE(a, ''), ' ', COAESCE(b,

CONCAT doesn't work with NULL?

2008-05-14 Thread Afan Pasalic
hi, I have query SELECT CONCAT(r.first_name, ' ', r.last_name, '\n', r.organization, '\n', r.title, '\n', a.address1, '\n', a.city, ', ', a.state, ' ', a.zip, '\n', r.email) FROM registrants r, addresses a WHERE r.reg_id=121 if any of columns has value (e.g. title) NULL, I'll get as result 0

Re: select does too much work to find rows where primary key does not match

2008-04-16 Thread Joerg Bruehe
1 2 3 3 1 3 2 Again, foo.phone is shown for explanation only. (This is the same for 'NOT', '!=', or '<>'.) Correct. The amount of work should be identical in both cases: grab a row, look up by primary k

Re: select does too much work to find rows where primary key does not match

2008-04-15 Thread Patrick J. McEvoy
> I would have thought your not = though is matching a lot more rows every > time.. The field is UNIQUE PRIMARY KEY in both tables, so there should be 0 or 1 matches. > I would look into using where not exists as a subselect My MySQL book (O'Reilly second edition) does not mention subqueries or

Re: select does too much work to find rows where primary key does not match

2008-04-15 Thread ddevaudreuil
| 10 | > > NULL | 3855468 | Using where; Using index | > > > > ++-+---+---+---+- > +-+--+-+--+ > > 2 rows in set (0.00 sec) > > > > (This is the same for 'NOT&#x

  1   2   3   4   5   6   7   8   9   10   >