9,816 reputation
11025
bio website
location Cincinnati, OH
age 43
visits member for 2 years, 3 months
seen 28 mins ago

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


5h
comment IF statement in ON clause
@ypercube's first suggestion would probably be easier for the optimizer to use to come up with the best query plan (although I would say add parentheses to clarify the operator precedence). With no context, it's hard to say, but using CASE inside ON (or WHERE, just like using any functions with column values as arguments) could constrain the number of plans the optimizer may be able to consider, limit its flexibility to re-order the tables in inner joins, and could increase the possibility of full table scans.
5h
comment Similar hardware, Same DBconfiguration and Database but different status variables result between Windows and Linux server
qcache_free_blocks is a count of contiguous blocks and tells you nothing about the block size; a totally empty query cache on a newly started server has exactly 1 free block. dba.stackexchange.com/questions/33811/…
1d
comment Can we protect data form Database Administrator by encrypting the data?
If you have a concern that the database administrator will steal your data, then you have a problem that cannot be solved with technology.
2d
comment Cannot open ssh tunne on MySQL
@RolandoMySQLDBA it's already been posted and placed "on hold" at ServerFault. I suspect it might be more on-topic at superuser.
2d
comment Cannot open ssh tunne on MySQL
Errno 11001 is "No such host is known" -- a DNS lookup failure. Is DNS working properly on your workstation? Does nslookup ec2-54-94-216-215.sa-east-1.compute.amazonaws.com from a command line prompt return the IP address as expected or does it give you an error?
Dec
17
comment After mysql server restarts I cannot see my own database
Why did you rename my.cnf?
Dec
14
comment ERROR 2013 (HY000) When long string data managed
"nothing seems to work" is a somewhat vague description of what you tried and didn't work. Where, specifically, did you change the setting for max_allowed_packet? There are separate settings for server and client, and Lost connection to MySQL server during query (I assume is the error message you see, you didn't include the actual text) suggests a client setting that's too small.
Dec
14
comment Could not start mysql or MariaDB. Permissions were ok, but mysql-bin.index permission error
What about the directory permissions on /var/lib/mysql itself? Error 13 on Linux is "Permission denied." (Use $perror 13 from the shell prompt to check error code 13)
Dec
13
comment mysql replication not working
This question, as it is written, is unclear. The output of SHOW MASTER STATUS; (master) and SHOW SLAVE STATUS; (slave) -- preferably included as text from the command line, rather than as a screen shot -- would be helpful, as well as any replication-specific configuration variables.
Dec
13
comment Should tables with very large records quantities be split into multiple tables
It's most certainly not "absolutely true." Splitting tables can cause problems of its own, as queries should (arguably) never have to blur the line between object identifiers and data... the name of the table where a given row will be found should not typically be something you ever have to construct (e.g. a "transactions_2014" table, for transactions in a particular year, 2014).
Dec
11
comment Is there a SELECT statement to subtract rows of the same column?
Subtract them from what?
Dec
9
comment Cannot ALTER TABLE
FWIW, rebooting an RDS instance shouldn't be expected to move it to new hardware. Another approach would be to take a snapshot of the database, restore to a new instance of the same size, and try the ALTER TABLE there, on the clone, to see what happens.
Dec
9
comment What's the approach to figure out reason for mysql crash?
What version of Percona Server are you running?
Dec
8
comment Why mysqldump is returning with error 1143: Couldn't execute 'show table status like
Use -f with extreme caution, because it masks errors, by definition, leaving you with an incomplete backup. Last I checked, it incorrectly leaves the exit status of the dump process set to 0, even if errors occurred.
Dec
8
comment How do I create a user-defined aggregate function in MySQL (redux)?
If you know how to write in C, user-defined aggregate functions are very easy, because MySQL does the grouping, then throws row values at it for each group, and asks it for the result... where "it" is the UDF code. Using it would be even easier than what you imagine above. But that's if you're proficient in C/C++, the only UDF environment supported.
Dec
2
comment Converting string to date with timezone adjustment
Hmmm. Works for me, as shown, so that would suggest that you haven't populated the MySQL time zone tables, so it's failing to do the conversion at the end. dev.mysql.com/doc/refman/5.6/en/mysql-tzinfo-to-sql.html
Dec
1
comment Signal in MYSQL procedure with parameters?
Have you tried this with the MySQL command line client? It could be a bug in whatever you're using to connect to MySQL, trying somehow to be "helpful" and suppressing the message in the process.
Dec
1
comment MySQL on dedicated 2048 Linode starting to swap
Is the server doing anything other than running MySQL? (i.e. running the web server, too?)
Nov
28
comment select on table slows done during update on same table
A query cache this large is a significant liability. Never full or pruned? Doesn't matter -- the time required for maintaining/managing the memory structures for such a large query cache will cost you performance. Something between 32MB and 256MB is probably a lot more reasonable.
Nov
20
comment schema for mysql database with 30million rows
You do realize that you have a seriously, seriously flawed schema here... right? Money should never be stored as FLOAT (nor as DOUBLE) and you should not be redundantly storing text for things like menu item or employee name.