8,565 reputation
1923
bio website
location Cincinnati, OH
age 43
visits member for 1 year, 10 months
seen 7 hours ago

If you question or otherwise fail to recognize the superiority of the relational model... you're doing it wrong.


Feb
11
answered MySQL how to change a slave to a new master?
Feb
10
comment MySQL views and table locking (5.1 MyISAM)
Other than my preferred plan, which would be "use InnoDB," depending on what you're needing to accomplish, you might find it useful to set up a slave server to run these long-running selects. MySQL also does support using different storage engines for the same table for master and slave. Or, if really you need to access the view from the master and the actual amount of data returned from the view isn't massive, you could create the view on the master, let the definition replicate, then create a federated table on the master that would directly access the view on the slave (which does work).
Feb
10
answered MySQL views and table locking (5.1 MyISAM)
Feb
10
answered mysql encryption key storage on file
Feb
9
comment How can I push data from my local MAMP database to my remote database?
What is the purpose of the "remote" server in your scheme? The question does not appear to adequately explain your motivation for doing this, and the amswer, it seems like, will (at least in part) depend on "why?" and "what are the implications of inconsistent data between the two?" Also, "the site" that you talk about having to take down because of foreign key issues... is that site running against the "local" database or the "remote" database?
Feb
7
comment Implementing older version of mySQL on RH9
Okay, @RolandoMySQLDBA, I'll bite. Why "never?" I would agree that official binaries are ideal, and I'll agree that it isn't ideal to compile your own, since you could be compiling against libraries that introduce vulnerabilities, like the big one a couple of years ago where a bad password would successfully log in if you tried it enough times... but the lesson I took away from that includes not running Linux-disto-provided MySQL either, since they generally compile from source, too (afaik). Is that why you say "never" -- potential instability or vulnerabilities?
Feb
6
comment How to use a column's latest date in query?
@LOSTinDB when you're optimizing and benchmarking queries, you want to use SELECT SQL_NO_CACHE ... which prevents the server from fooling you with a query running faster the 2nd time you run it. If the underlying tables don't change between runs, the server may server up cached results, skewing your timing measurements.
Feb
6
comment Abnormally high MySQL writes and larger than normal Binary Log files. How can I determine what caused this?
You aren't likely to be able to open it with anything, but you can pipe the output of mysqlbinlog through less and page through it, using the space bar, and use / followed by a simple text string or regular expression to seek forward in the stream to the next occurrence of the search string. Control-u to go up a screen or ctrl-d to go down. Or pipe through grep to find or count occurrences of specific things. Or use split or sed or tail or head to divide it into more manageable chunks.
Feb
6
answered Abnormally high MySQL writes and larger than normal Binary Log files. How can I determine what caused this?
Feb
6
comment How to create trigger to update timestamp when record is updated or inserted in another table
There isn't much that's unique to triggers that isn't applicable to all stored programs, other than the OLD and NEW aliases, which is what you need to test, to avoid acting on an update that doesn't change interesting columns... IF NOT (OLD.column_name <=> NEW.column_name) THEN trigger actions here END IF; ... the NOT <=> test is the same as != except that it is also true when both sides of the comparison are null, which is not the case for != which evaluates as null when either side is null.
Feb
6
comment How to create trigger to update timestamp when record is updated or inserted in another table
...and even if the errors weren't there, it appears as if all it would do would be to update values to what they already are, which would not cause auto-timestamps to be updated, since data updating a value to what it already holds doesn't change ON UPDATE CURRENT_TIMESTAMP values.
Feb
6
comment How to create trigger to update timestamp when record is updated or inserted in another table
Your code contains numerous errors, including confusion and ambiguity between local variables (not beginning with @), column names (which are being ignored because you've declared local variables of the same name), and user defined variables (beginning with @).
Feb
6
comment delete in stored procedure
“A local variable should not have the same name as a table column. If an SQL statement, such as a SELECT ... INTO statement, contains a reference to a column and a declared local variable with the same name, MySQL currently interprets the reference as the name of a variable.” — dev.mysql.com/doc/refman/5.6/en/local-variable-scope.html
Feb
6
comment delete in stored procedure
@Phil, you're right, although in this case, the server resolves the ambiguity by assuming you are comparing the local variable to itself, since local variables are case insensitive and have precedence over column names when there's more than one possible interpretation. Same net result, if the variable isn't null.
Feb
6
reviewed Leave Open Out-of-Range and Overflow Handling for float values
Feb
5
comment Lock time not involved in MySQL slow query selection?
Sure, real environment optimization is an important pursuit, but what I mean is that my intuitive conclusion was that this isn't the purpose of the slow query log... it's for finding bad queries, not overloaded environments. Your application can tell how long queries take. The slow query log can tell you which ones are most likely to need attention because of their intrinsic design without regard to external factors. Also, don't use MyISAM. :)
Feb
5
answered Lock time not involved in MySQL slow query selection?
Feb
4
reviewed Close Cannot Start SQL Server Reporting Service
Feb
4
reviewed Close The meaning of the Roles in SQL Server 2008 R2
Feb
4
reviewed Close Terminology No-SQL Database