In MySQL 8, how do you distinguish between Roles and Users in table mysql.user?

2018-10-30 Thread Martijn Tonies (Upscene Productions)
Hi there, In MySQL 8, how can you figure out if an entry in the mysql.user table is a role or a user? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Database Workbench - developer tool for Oracle, MS SQL Server, PostgreSQL, SQL Anywhere, MySQL, InterBase, NexusDB and F

Re: dump then truncate - in between anything?

2016-03-15 Thread lejeczek
ldump && truncate - what are the chances that something gets in between and I loose it? many thanks L. If what you are trying to do is something like: - archive contents of live table from current period - empty live table - start collecting input again thanks, and to Johan, it'

Re: dump then truncate - in between anything?

2016-03-13 Thread Richard
&& truncate - what are > the chances that something gets in between and I loose it? > > many thanks > L. If what you are trying to do is something like: - archive contents of live table from current period - empty live table - start collecting input again you mig

dump then truncate - in between anything?

2016-03-09 Thread lejeczek
hi everybody I imagine this is theoretical rather than practical question, albeit I don't have much practice, so I hope experts could comment logical view of the procedure is: mysqldump && truncate - what are the chances that something gets in between and I loose it?

relation between innodb_thread_concurrency and MySQL threads

2015-02-07 Thread Learner Study
Hello, Could someone educate me on relation between "innodb_thread_concurrency" and number of MySQL threads running on the server with "thread pool" feature in Enterprise version of MySQL (based on release 5.6.16 (.4)?) If I set "innodb_thread_concurrency=32", how m

Re: Difference between log-buffer "flushing" and "log-buffer" syncing?

2014-04-17 Thread Ajay Garg
On Thu, Apr 17, 2014 at 3:03 PM, Manuel Arostegui wrote: > > > > 2014-04-17 11:11 GMT+02:00 Ajay Garg : > > On Thu, Apr 17, 2014 at 2:28 PM, Reindl Harald > >wrote: >> >> > >> > >> > Am 17.04.2014 10:55, schrieb Ajay Garg: >> > > I do understand the meaning of Unix "sync" function. >> > > >> > >

Re: Difference between log-buffer "flushing" and "log-buffer" syncing?

2014-04-17 Thread Manuel Arostegui
2014-04-17 11:11 GMT+02:00 Ajay Garg : > On Thu, Apr 17, 2014 at 2:28 PM, Reindl Harald >wrote: > > > > > > > Am 17.04.2014 10:55, schrieb Ajay Garg: > > > I do understand the meaning of Unix "sync" function. > > > > > > So, you mean to say that "flushing" and "syncing" are same, in the > > conte

Re: Difference between log-buffer "flushing" and "log-buffer" syncing?

2014-04-17 Thread Ajay Garg
f > > "innodb_flush_log_at_trx_commit< > http://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit > > > > > ". > > > > > > So, I will be grateful if I could gain some

Re: Difference between log-buffer "flushing" and "log-buffer" syncing?

2014-04-17 Thread Reindl Harald
articular, these two terms hold great significance while selecting > the > > value of > > "innodb_flush_log_at_trx_commit<http://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit> > > ". > > >

Re: Difference between log-buffer "flushing" and "log-buffer" syncing?

2014-04-17 Thread Ajay Garg
gt; > value of "innodb_flush_log_at_trx_commit< > http://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit > > > > ". > > > > So, I will be grateful if I could gain some light on the differences > > betwee

Re: Difference between log-buffer "flushing" and "log-buffer" syncing?

2014-04-17 Thread Reindl Harald
ance while selecting the > value of > "innodb_flush_log_at_trx_commit<http://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit> > ". > > So, I will be grateful if I could gain some light on the differences > between the tw

Difference between log-buffer "flushing" and "log-buffer" syncing?

2014-04-17 Thread Ajay Garg
sh_log_at_trx_commit<http://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit> ". So, I will be grateful if I could gain some light on the differences between the two terms. Thanks and Regards, Ajay

Re: grouping by the difference between values in rows

2014-01-21 Thread Takeshi Hashimoto
For me, it seems just use [case - when ] on the difference between x and y, and group by with output. Good luck *\(^o^)/* Sent from my iPhone On Jan 21, 2014, at 15:38, h...@tbbs.net wrote: >>>>> 2014/01/12 14:17 -0500, Larry Martell >>>> > I've been asked

Re: grouping by the difference between values in rows

2014-01-21 Thread hsv
2014/01/12 14:17 -0500, Larry Martell I've been asked to do something that I do not think is possible in SQL. I have a query that has this basic form: SELECT a, b, c, d, AVG(e), STD(e), CONCAT(x, ',', y) as f FROM t GROUP BY a, b, c, d, f x and y are numbers (378.18, 2213.797 or 378.21

Re: grouping by the difference between values in rows

2014-01-15 Thread Larry Martell
On Wed, Jan 15, 2014 at 4:06 PM, shawn l.green wrote: > Hello Larry, > > > On 1/13/2014 2:43 AM, Peter Brawley wrote: >> >> >> On 2014-01-12 9:13 PM, Larry Martell wrote: >>> >>> On Sun, Jan 12, 2014 at 2:47 PM, Peter Brawley >>> wrote: On 2014-01-12 1:17 PM, Larry Martell wrote: >

Re: grouping by the difference between values in rows

2014-01-15 Thread shawn l.green
Hello Larry, On 1/13/2014 2:43 AM, Peter Brawley wrote: On 2014-01-12 9:13 PM, Larry Martell wrote: On Sun, Jan 12, 2014 at 2:47 PM, Peter Brawley wrote: On 2014-01-12 1:17 PM, Larry Martell wrote: I've been asked to do something that I do not think is possible in SQL. I have a query that

Re: grouping by the difference between values in rows

2014-01-13 Thread Larry Martell
On Mon, Jan 13, 2014 at 2:43 AM, Peter Brawley wrote: > > On 2014-01-12 9:13 PM, Larry Martell wrote: >> >> On Sun, Jan 12, 2014 at 2:47 PM, Peter Brawley >> wrote: >>> >>> On 2014-01-12 1:17 PM, Larry Martell wrote: I've been asked to do something that I do not think is possible in SQL

Re: grouping by the difference between values in rows

2014-01-12 Thread Peter Brawley
On 2014-01-12 9:13 PM, Larry Martell wrote: On Sun, Jan 12, 2014 at 2:47 PM, Peter Brawley wrote: On 2014-01-12 1:17 PM, Larry Martell wrote: I've been asked to do something that I do not think is possible in SQL. I have a query that has this basic form: SELECT a, b, c, d, AVG(e), STD(e), C

Re: grouping by the difference between values in rows

2014-01-12 Thread Larry Martell
On Sun, Jan 12, 2014 at 2:47 PM, Peter Brawley wrote: > On 2014-01-12 1:17 PM, Larry Martell wrote: >> >> I've been asked to do something that I do not think is possible in SQL. >> >> I have a query that has this basic form: >> >> SELECT a, b, c, d, AVG(e), STD(e), CONCAT(x, ',', y) as f >> FROM t

Re: grouping by the difference between values in rows

2014-01-12 Thread Peter Brawley
On 2014-01-12 1:17 PM, Larry Martell wrote: I've been asked to do something that I do not think is possible in SQL. I have a query that has this basic form: SELECT a, b, c, d, AVG(e), STD(e), CONCAT(x, ',', y) as f FROM t GROUP BY a, b, c, d, f x and y are numbers (378.18, 2213.797 or 378.218,

grouping by the difference between values in rows

2014-01-12 Thread Larry Martell
I've been asked to do something that I do not think is possible in SQL. I have a query that has this basic form: SELECT a, b, c, d, AVG(e), STD(e), CONCAT(x, ',', y) as f FROM t GROUP BY a, b, c, d, f x and y are numbers (378.18, 2213.797 or 378.218, 2213.949 or 10053.490, 2542.094). The busine

RE: Bug in BETWEEN same DATETIME

2013-05-29 Thread Rick James
t; Sent: Friday, May 24, 2013 11:08 AM > To: mysql@lists.mysql.com > Subject: Re: Bug in BETWEEN same DATETIME > > >>>> 2013/05/24 09:49 -0400, shawn green >>>> > Or we could coerce datetime values back to their date values when both > are being used. The

Re: Bug in BETWEEN same DATETIME

2013-05-24 Thread hsv
>>>> 2013/05/24 09:49 -0400, shawn green >>>> Or we could coerce datetime values back to their date values when both are being used. The trick now becomes choosing between rounding the datetime value (times past noon round to the next date) or do we use the floor(

Re: Bug in BETWEEN same DATETIME

2013-05-24 Thread shawn green
. A common problem is comparing a FLOAT value to a 'decimal' value like 1.23. MySQL does a good job of covering some cases, but there are still cases between DECIMAL, FLOAT, DOUBLE, and literals that will register as inequality, to the surprise of the user. I see the DATE problem as ano

RE: Bug in BETWEEN same DATETIME

2013-05-24 Thread Rick James
f covering some cases, but there are still cases between DECIMAL, FLOAT, DOUBLE, and literals that will register as inequality, to the surprise of the user. I see the DATE problem as another thing where the user needs to understand the computer's algorithm, which, as Shawn points out is

Re: Bug in BETWEEN same DATETIME

2013-05-24 Thread shawn green
transformation for you. Hint, hint, Shawn.) Or we could coerce datetime values back to their date values when both are being used. The trick now becomes choosing between rounding the datetime value (times past noon round to the next date) or do we use the floor() function all the time. This

Re: Bug in BETWEEN same DATETIME

2013-05-23 Thread Andrew Moore
Personally I don't share your view that it's a bug. Omitting the time results in midnight by default so this screws between because there's no time between 00:00:00 and 00:00:00. Are you having operational issues here or are you simply fishing for bugs? WHERE `transaction_date`

RE: Bug in BETWEEN same DATETIME

2013-05-23 Thread Peterson, Timothy R
You probably want where cast(transaction_date as date) BETWEEN '2013-04-16' AND '2013-04-16' That works on my test case You could also change the where clause to be >= date and < date+1 -Original Message- From: Daevid Vincent [mailto:dae...@daevid.co

Re: Bug in BETWEEN same DATETIME

2013-05-23 Thread Michael Dykman
>> where cast(transaction_date as date) BETWEEN '2013-04-16' AND This approach might be problematic in that it requires that every row in the source table be examined so that it's transaction_date can be casted. The original formulation is more efficient as

Re: Bug in BETWEEN same DATETIME

2013-05-23 Thread shawn green
On 5/23/2013 4:55 PM, Daevid Vincent wrote: I just noticed what I consider to be a bug; and related, has this been fixed in later versions of MySQL? We are using: mysql Ver 14.12 Distrib 5.0.92, for portbld-freebsd8.1 (amd64) using 5.2 If you use BETWEEN and the same date for both parts

RE: Bug in BETWEEN same DATETIME

2013-05-23 Thread Rick James
iginal Message- > From: shawn green [mailto:shawn.l.gr...@oracle.com] > Sent: Thursday, May 23, 2013 3:50 PM > To: mysql@lists.mysql.com > Subject: Re: Bug in BETWEEN same DATETIME > > > > On 5/23/2013 4:55 PM, Daevid Vincent wrote: > > I just noticed what I

RE: Bug in BETWEEN same DATETIME

2013-05-23 Thread Rick James
he same starting date. > -Original Message- > From: Michael Dykman [mailto:mdyk...@gmail.com] > Sent: Thursday, May 23, 2013 2:56 PM > To: MySql > Subject: Re: Bug in BETWEEN same DATETIME > > >> where cast(transaction_date as date) BETWEEN '2013-04-16&#x

Re: Bug in BETWEEN same DATETIME

2013-05-23 Thread Andrew Moore
Sorry, that was meant to be; WHERE (new column stored as date) = '2013-04-16' On Thu, May 23, 2013 at 10:16 PM, Andrew Moore wrote: > Personally I don't share your view that it's a bug. Omitting the time > results in midnight by default so this screws between because

Re: InnoDB interaction between secondary and primary keys.

2013-02-01 Thread Jeremy Chase
; > -Original Message- > > From: Rick James > > Sent: Wednesday, January 30, 2013 1:08 PM > > To: 'Jeremy Chase'; mysql@lists.mysql.com > > Subject: RE: InnoDB interaction between secondary and primary keys. > > > > secondarykey and r

RE: InnoDB interaction between secondary and primary keys.

2013-01-30 Thread Rick James
ql@lists.mysql.com > Subject: RE: InnoDB interaction between secondary and primary keys. > > secondarykey and redundantkey are redundant with each other -- in all > versions of InnoDB. > > One "expert" said that redundant key would have two copies of `1`,`2`. > I think h

RE: InnoDB interaction between secondary and primary keys.

2013-01-30 Thread Rick James
.com > Subject: InnoDB interaction between secondary and primary keys. > > Hello, > > I've been working with a secondary index and would like some > clarification about how the primary columns are included. So, in the > following example, is the secondaryKey effective

Re: Replication between different versions

2012-11-15 Thread Reindl Harald
Am 15.11.2012 12:46, schrieb Manuel Arostegui: > 2012/11/15 Lorenzo Milesi > >> Hi. >> >> Is it possible to have a master/master replication between servers of >> different versions? >> Now I've two 5.0.51 syncing themselves. I'm installing a n

Re: Replication between different versions

2012-11-15 Thread Manuel Arostegui
2012/11/15 Lorenzo Milesi > Hi. > > Is it possible to have a master/master replication between servers of > different versions? > Now I've two 5.0.51 syncing themselves. I'm installing a new server with > 5.5.28 and I'd like if I can upgrade but still mantainin

Re: copy some values between rows

2012-08-23 Thread Elim Qiu
mysql> update student t1, student t2 -> set t1.gpa = t2.gpa -> where t1.id=5 and t2.id=1; Query OK, 1 row affected (0.36 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from student; +++--+ | id | name | gpa | +++--+ | 1 | Bob | 4.0 | |

copy some values between rows

2012-08-23 Thread Elim Qiu
Consider two rows with id m and n in a table tb with a column cl, what's the sql command to set the value of cl in row n the same as that in row m? Below is my testing mysql> desc student; +---+--+--+-+-++ | Field | Type | Null | Key | Defau

Re: Difference between internal data dictionary and table definition file

2012-03-27 Thread Johan De Meersman
ace files. > > I want to know where comes the difference between InnoDB internal > data dictionary and table definition ( .frm ) files . Do they store the > same information about a table ? InnoDB still stores .frm files for the benefit of the MySQL daemon. I'm no master o

RE: how to sync mysql.user table between to two mysql instances

2012-03-17 Thread Brown, Charles
Johan De Meersman [mailto:vegiv...@tuxera.be] Sent: Friday, March 16, 2012 5:00 PM To: Baron Schwartz Cc: MySql Subject: Re: how to sync mysql.user table between to two mysql instances - Original Message - > From: "Baron Schwartz" > > 1. With mysqldump. mysqldump -hm

Re: how to sync mysql.user table between to two mysql instances

2012-03-16 Thread Johan De Meersman
- Original Message - > From: "Baron Schwartz" > > 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql > -hmysql-inst2 mysql And then, of course, issue a FLUSH PRIVILEGES on mysql-inst2 :-) -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't dri

RE: how to sync mysql.user table between to two mysql instances

2012-03-16 Thread David Lerer
6, 2012 2:59 PM To: David Lerer; Baron Schwartz; MySql Subject: RE: how to sync mysql.user table between to two mysql instances Hello David, Precisely, that's what my problem is. The users found in mysqlinst1 are not in mysqlinst2. There are about 30 users defined in inst1 and only 4 in ins

RE: how to sync mysql.user table between to two mysql instances

2012-03-16 Thread Brown, Charles
dious. Help me I'm running out of time. -Original Message- From: David Lerer [mailto:dle...@us.univision.com] Sent: Friday, March 16, 2012 1:36 PM To: Baron Schwartz; MySql; Brown, Charles Subject: RE: how to sync mysql.user table between to two mysql instances As a follow up ques

RE: how to sync mysql.user table between to two mysql instances

2012-03-16 Thread David Lerer
sync mysql.user table between to two mysql instances Charles, 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql -hmysql-inst2 mysql 2. With pt-table-sync from Percona Toolkit if you need something more sophisticated. On Fri, Mar 16, 2012 at 1:27 PM, Brown, Charles wrote: > Can some

Re: how to sync mysql.user table between to two mysql instances

2012-03-16 Thread Baron Schwartz
Charles, 1. With mysqldump. mysqldump -hmysql-inst1 mysql | mysql -hmysql-inst2 mysql 2. With pt-table-sync from Percona Toolkit if you need something more sophisticated. On Fri, Mar 16, 2012 at 1:27 PM, Brown, Charles wrote: > Can someone instruct me on how to sync mysql.user table between

how to sync mysql.user table between to two mysql instances

2012-03-16 Thread Brown, Charles
Can someone instruct me on how to sync mysql.user table between to two mysql instances. In other words, I wouild like to copy mysql.user from mysql-inst1 to mysql-inst2 + Thanks This message is intended only for the use of the Addressee and may

Re: replication between two tables in same database

2011-10-02 Thread Anupam Karmarkar
Try out functionality you desire with trigger to replicate data From: Derek Downey To: [MySQL] Sent: Thursday, 29 September 2011 10:46 PM Subject: Re: replication between two tables in same database You could look into the sphinx engine http

Re: replication between two tables in same database

2011-09-30 Thread Peter Boros
11, you wrote: > > > >> But I could create an additional myisam table to overcome my problem > >> providing I can get the data to synchronise between the two tables > >> > >> On 29 Sep 2011, at 18:16, Reindl Harald wrote: > >> > >> &g

Re: replication between two tables in same database

2011-09-29 Thread Tompkins Neil
on InnoDb tables so you don't have to > export the data to MyISAM. > > Mike > > At 01:43 PM 9/29/2011, you wrote: > >> But I could create an additional myisam table to overcome my problem >> providing I can get the data to synchronise between the two tables &

Re: replication between two tables in same database

2011-09-29 Thread Neil Tompkins
drew Moore wrote: > Hey Neil, it sure is possible through standard replication configuration. > > Hth Andy > > On Sep 29, 2011 5:57 PM, "Tompkins Neil" wrote: > > Hi > > > > I've a Innodb and MyISAM table in the SAME database that I wish to rep

Re: replication between two tables in same database

2011-09-29 Thread Neil Tompkins
ata to MyISAM. > > Mike > > At 01:43 PM 9/29/2011, you wrote: >> But I could create an additional myisam table to overcome my problem >> providing I can get the data to synchronise between the two tables >> >> On 29 Sep 2011, at 18:16, Reindl Harald wrote: >&g

Re: replication between two tables in same database

2011-09-29 Thread mos
roviding I can get the data to synchronise between the two tables On 29 Sep 2011, at 18:16, Reindl Harald wrote: > so mysql is currently the wrong database for your project > sad but true, you can not have fulltext-search and innodb this time > > Am 29.09.2011 19:15, schrieb T

Re: replication between two tables in same database

2011-09-29 Thread Neil Tompkins
But I could create an additional myisam table to overcome my problem providing I can get the data to synchronise between the two tables On 29 Sep 2011, at 18:16, Reindl Harald wrote: > so mysql is currently the wrong database for your project > sad but true, you can not have fulltext-

Re: replication between two tables in same database

2011-09-29 Thread Derek Downey
You could look into the sphinx engine http://sphinxsearch.com/about/sphinx/ No experience with this personally though - Derek On Sep 29, 2011, at 1:07 PM, Tompkins Neil wrote: > Yes, unless I can set-up some sort of replication between the two tables. > > On Thu, Sep 29, 2011 a

Re: replication between two tables in same database

2011-09-29 Thread Reindl Harald
myisam for > select * from table where field like '%input%'; > > for most workloads this is enough and you have not the problem > with stop-words, minimum input length and so on > > Am 29.09.2011 19:07, schrieb Tompkins Neil: > > Yes, unless I can

Re: replication between two tables in same database

2011-09-29 Thread Tompkins Neil
eil: > > Yes, unless I can set-up some sort of replication between the two tables. > > > > On Thu, Sep 29, 2011 at 6:05 PM, Reindl Harald >wrote: > > > >> please do NOT post off-list! > >> > >> so your only workaround is like '%whatever%' c

Re: replication between two tables in same database

2011-09-29 Thread Reindl Harald
some sort of replication between the two tables. > > On Thu, Sep 29, 2011 at 6:05 PM, Reindl Harald wrote: > >> please do NOT post off-list! >> >> so your only workaround is like '%whatever%' currently >> >> Am 29.09.2011 19:04, schrieb Tompkins Neil:

Re: replication between two tables in same database

2011-09-29 Thread Tompkins Neil
Yes, unless I can set-up some sort of replication between the two tables. On Thu, Sep 29, 2011 at 6:05 PM, Reindl Harald wrote: > please do NOT post off-list! > > so your only workaround is like '%whatever%' currently > > Am 29.09.2011 19:04, schrieb Tompkins Neil: >

Re: replication between two tables in same database

2011-09-29 Thread Jim Moseby
Sounds like a job for CREATE TRIGGER to me. :) http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html >>> Tompkins Neil 9/29/2011 12:56 PM >>> Hi I've a Innodb and MyISAM table in the SAME database that I wish to replicate the data between the two because

Re: replication between two tables in same database

2011-09-29 Thread Reindl Harald
Am 29.09.2011 18:56, schrieb Tompkins Neil: > Hi > > I've a Innodb and MyISAM table in the SAME database that I wish to replicate > the data between the two because I need to use FULLTEXT searching on > the MyISAM table. Is this possible ? If so how do I do it. in short: n

replication between two tables in same database

2011-09-29 Thread Tompkins Neil
Hi I've a Innodb and MyISAM table in the SAME database that I wish to replicate the data between the two because I need to use FULLTEXT searching on the MyISAM table. Is this possible ? If so how do I do it. Thanks Neil

Tables are lost for DDL and different behaviors for alter table failed situation between innobase and innodb_plugin

2011-08-11 Thread hiu
trx_general_rollback_for_mysql(trx, NULL); 3909 trx->error_state = DB_SUCCESS; 3910 goto funct_exit; 3911 } 2.3 client's output: root@sbtest 05:00:24>alter table sb1 add column d2 int; Query OK, 0 rows affected (9 min 47.9

Re: Moving data between two servers with SQL

2011-01-04 Thread Hank
Nevermind -- it's working absolutely perfectly between 5.5.8 and 4.1.x. Thanks again for the push. -Hank On Tue, Jan 4, 2011 at 5:14 PM, Hank wrote: > > Also, can I do this: > > insert into federated_table select * from local_table? > > -Hank > > > On Tue, Jan

Re: Moving data between two servers with SQL

2011-01-04 Thread Hank
; another server? In Oracle, we used to be able to set up connection >> profiles >> and move data between servers with SQL, but I'm guessing that's not easy >> to >> do with MySQL. I'd prefer not to use mysql command line client commands >> to >> save

Re: Moving data between two servers with SQL

2011-01-04 Thread Hank
he entire table, >> just a small subset of the table needs to move). What's the >> easiest/cleanest way of moving those records to an identical table on >> another server? In Oracle, we used to be able to set up connection >> profiles >> and move data between servers wi

Re: Moving data between two servers with SQL

2011-01-04 Thread Shawn Green (MySQL)
ing those records to an identical table on another server? In Oracle, we used to be able to set up connection profiles and move data between servers with SQL, but I'm guessing that's not easy to do with MySQL. I'd prefer not to use mysql command line client commands to save the data as an

Moving data between two servers with SQL

2011-01-04 Thread Hank
n another server? In Oracle, we used to be able to set up connection profiles and move data between servers with SQL, but I'm guessing that's not easy to do with MySQL. I'd prefer not to use mysql command line client commands to save the data as an OS file and then import that int

counting between dates across number of tables

2010-10-31 Thread William Hamilton
I have three tables show below which I am querying in a number of ways. e.g. I have a report which lists number of reports provided compaired to number which were due over the duration of the project. I am puzzling over how to select the reports which were due and were delivered during a week base

Re: Performing subtraction between fields

2010-08-21 Thread Dan Nelson
In the last episode (Aug 21), Ashish Mukherjee said: > Well, since you are searching that column, it's probably a good idea. > > Possible scenarios for not storing computed values - > > 1) Data integrity - say, the columns A and B are updated but C does not get > updated, resulting in an anomalo

Re: Performing subtraction between fields

2010-08-21 Thread Chris W
If you want C to always be A-B then it would, in my opinion, be a very bad idea to store C in the table. Instead you can just put C in your query. SELECT `A`, `B`, `A` - `B` AS `C` FROM `table` If that seems like a hassle, you could always create a view using that select. Chris W b...@qxhp

Re: Performing subtraction between fields

2010-08-21 Thread Ashish Mukherjee
Well, since you are searching that column, it's probably a good idea. Possible scenarios for not storing computed values - 1) Data integrity - say, the columns A and B are updated but C does not get updated, resulting in an anomalous situation 2) Data-set is large and the extra column leads to

Re: Performing subtraction between fields

2010-08-21 Thread Ashley Stars
Ashish, Mark and off-list responders, Thanks! Ashish, is there a really good general reason not to store a computed value? Searches will be done on this column. Searches like 'Please send me the rows with the ten highest values of C.' > Do you have a really good reason to store a computed value?

Re: Performing subtraction between fields

2010-08-21 Thread Ashish Mukherjee
Do you have a really good reason to store a computed value? It's only useful if you will perform a search on the column, else you could just do the subtraction when you SELECT columns A and B. - Ashish On Sat, Aug 21, 2010 at 11:55 AM, wrote: > Hello, > > For simplicity's sake, let's say I have

Re: Performing subtraction between fields

2010-08-21 Thread Mark Goodge
On 21/08/2010 07:25, b...@qxhp.com wrote: Hello, For simplicity's sake, let's say I have three fields, A, B and C, all of which are integers. I'd like the value of C to be equal to A less B (A-B). Is there a way I can perform this calculation? I'm guessing it would happen when I INSERT a row and

Performing subtraction between fields

2010-08-20 Thread b
Hello, For simplicity's sake, let's say I have three fields, A, B and C, all of which are integers. I'd like the value of C to be equal to A less B (A-B). Is there a way I can perform this calculation? I'm guessing it would happen when I INSERT a row and specify the values for A and B. Feel free t

Re: [Spam][78.6%] Re: Differences between 2 MySQL instances

2010-06-24 Thread Octavian Rasnita
From: "Joerg Bruehe" Hi! Octavian Rasnita wrote: I have tried, but with no difference. I have changed some indexes and made the queries run faster, but I still found a problem: I use a module that does paging and it makes a select(*) and this query takes a very long time. I have also t

Re: Differences between 2 MySQL instances

2010-06-24 Thread Joerg Bruehe
ge - > From: John Daisley > To: Octavian Rasnita > Cc: mysql@lists.mysql.com > Sent: Wednesday, June 23, 2010 3:55 PM > Subject: Re: Differences between 2 MySQL instances > > > Have you tried running 'OPTIMIZE TABLE' on the tables in question

Re: Differences between 2 MySQL instances

2010-06-23 Thread Octavian Rasnita
Rasnita Cc: mysql@lists.mysql.com Sent: Wednesday, June 23, 2010 3:55 PM Subject: Re: Differences between 2 MySQL instances Have you tried running 'OPTIMIZE TABLE' on the tables in question to make sure statistics are up to date. I would expect the vast majority of queries to

Re: Differences between 2 MySQL instances

2010-06-23 Thread John Daisley
h this query uses the same index as the one under Windows, the > number of estimated rows is approximately the total number of rows in the > table and it also takes a very long time to complete. > > Do you have any idea why this works differently under Linux? Is it because > under

Differences between 2 MySQL instances

2010-06-22 Thread Octavian Rasnita
in the table and it also takes a very long time to complete. Do you have any idea why this works differently under Linux? Is it because under Linux I have MySQL 5.0 and under Windows MySQL 5.1 and I definitely need to upgrade? There are some differences between the global variables that star

Re: Replication between MySQL 3.23.58 and MySQL 5.1.46

2010-05-05 Thread Claudio Nanni
HI Neil, first I dont know if you can do it. As a basic rule if not same version, Master version should always be older than slave, but I am afraid binary log format is too different from 3.23 to 5.1 If you have problems with direct replication In your case I would suggest a couple of solutions.

Replication between MySQL 3.23.58 and MySQL 5.1.46

2010-05-05 Thread Tompkins Neil
Hi, Does anyone know of any issues if we try to replicate data from MySQL database version 3.23.58 and MySQL 5.1.46 ? Cheers Neil

RE: Obtain week number between years

2010-04-29 Thread Steven Staples
You could also try it this way, and then in the application, you can find out what the dates are, that they are between. SELECT YEARWEEK(`datefield`) AS 'week', COUNT(`visits`) AS 'visits' FROM `mytable` WHERE YEAR(`datefield`) = '2009' GROUP BY YEARWEEK

Re: Obtain week number between years

2010-04-29 Thread Baron Schwartz
Neil, I would start with something like this, assuming the date column is called "d": SELECT FROM GROUP BY d - INTERVAL DAYOFWEEK(d) DAY; - Baron On Thu, Apr 29, 2010 at 8:12 AM, Tompkins Neil wrote: > Hi > > We need to produce a query to return the total number of user v

Re: Obtain week number between years

2010-04-29 Thread Johan De Meersman
group by week(yourdate) ? On Thu, Apr 29, 2010 at 2:12 PM, Tompkins Neil wrote: > Hi > > We need to produce a query to return the total number of user visits > between > two date ranges that span over two year e.g from 2009-04-29 to 2010-04-29. > My question is how can I comp

Obtain week number between years

2010-04-29 Thread Tompkins Neil
Hi We need to produce a query to return the total number of user visits between two date ranges that span over two year e.g from 2009-04-29 to 2010-04-29. My question is how can I compute the totals for each week within a query ? for example 2009-04-29 to 2009-05-06 100 visits 2009-05-07 to

Re: difference between MySQL 5.5.3 and 5.5.4

2010-04-26 Thread Joerg Bruehe
Hi! Zardosht Kasheff wrote: > Hello all, > > What is the difference between 5.5.4 and 5.5.3? I see that 5.5.3 is > available on more platforms. Is one more stable than the other? MySQL 5.5.3 and 5.5.4 were announced in one common mail on this list, and that mail also tells what is

difference between MySQL 5.5.3 and 5.5.4

2010-04-23 Thread Zardosht Kasheff
Hello all, What is the difference between 5.5.4 and 5.5.3? I see that 5.5.3 is available on more platforms. Is one more stable than the other? Thanks -Zardosht -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub

Fwd: how to switch between users

2010-01-29 Thread Wagner Bianchi
alikrishna g > wrote: > > > i am working on my pc with mysql-5.0.27-community-nt > > i have created users by using create user and i given some privileges, > but > > i > > dont know how to switch between users on mysql command line, please help > me > > re

Re: how to switch between users

2010-01-29 Thread Suresh Kuna
given some privileges, but > i > dont know how to switch between users on mysql command line, please help me > regarding this.. > thanks in advance > -- Thanks Suresh Kuna MySQL DBA

how to switch between users

2010-01-29 Thread muralikrishna g
i am working on my pc with mysql-5.0.27-community-nt i have created users by using create user and i given some privileges, but i dont know how to switch between users on mysql command line, please help me regarding this.. thanks in advance

Re: describe relation between LDAP entries

2010-01-13 Thread Mihamina Rakotomandimby
> Mihamina Rakotomandimby : > Have you another way to do it? > - splitting the comma separated fields? I mean: customer_cn|customer_sn| customer_uid|modem_cn|modem_sn|modem_uid| staff | (null) |(null) |staff | (null)| (null) | Joe M |Mudd | joem|Joe M |

describe relation between LDAP entries

2010-01-13 Thread Mihamina Rakotomandimby
Manao ahoana, Hello, Bonjour, I have LDAP entries, and SQL tables are the relation between them. There are only relations between 2 entries. There are "modem" and "customers" entries in the LDAP directory I need advice on optimizing the way I store relations. For exam

Re: Are there any difference between max_connection and max_user_connection?

2010-01-07 Thread Suresh Kuna
It should be identical select statements which will improve performance and not the updates. Go through the below url for more information about optimization and performance http://dev.mysql.com/doc/refman/5.0/en/optimizing-the-server.html On Thu, Jan 7, 2010 at 4:42 PM, F.A.I.Z.A.L wrote: > h

Re: Are there any difference between max_connection and max_user_connection?

2010-01-07 Thread F.A.I.Z.A.L
hi i can see many 'updates' is going every min. so is it good to increase this query_cache_size ?.. what are the other action i can take to improve the performance of mysql server environment version : 5.0.22 platform : redhat 5 Cheers Faizal S GSM : 9840118673 Blog: http://oradbapro.blogspot.

Re: Are there any difference between max_connection and max_user_connection?

2010-01-07 Thread sureshkumarilu
If the queries are identical then Yes. If not it will degrade the query performance. Sent from BlackBerry® on Airtel -Original Message- From: "F.A.I.Z.A.L" Date: Thu, 7 Jan 2010 15:51:19 To: Suresh Kuna Cc: Subject: Re: Are there any difference between max_conn

Re: Are there any difference between max_connection and max_user_connection?

2010-01-07 Thread F.A.I.Z.A.L
> for an account ) of the MySQLD server. >>> >>> Suresh Kuna >>> MySQL DBA >>> >>> On Thu, Jan 7, 2010 at 11:00 AM, F.A.I.Z.A.L wrote: >>> >>>> Dear all >>>> >>>> I can see max_connection and max_user_conne

Re: Are there any difference between max_connection and max_user_connection?

2010-01-06 Thread Suresh Kuna
> >>> Dear all >>> >>> I can see max_connection and max_user_connection set to default value. >>> but >>> daily i can see 40 to 70 users connection to the database. how? when >>> max_user_connections=0. what is the different between these two >

  1   2   3   4   5   6   7   8   9   10   >