Cloak & Dagger May Be the Most Messed-Up Kids Movie of the ’80s

Cloak & Dagger May Be the Most Messed-Up Kids Movie of the '80s

“Do you remember the movie Cloak & Dagger?” my editor asked. Immediately, I froze. Did he know I used to be obsessed with that little-known ’80s movie about a kid and his imaginary spy friend? He didn’t; it was just a random question, but it made me sit down and do one of the scariest things you can do as an adult film fan: re-watch a movie you loved as a kid.

Cloak & Dagger, directed by Richard Franklin in 1984, was one of those kid adventure films that dominated the decade, like The Goonies, E.T., Fright Night, Monster Squad, The Lost Boys, etc.—movies that featured kids as the protagonists, who not only had to defeat the bad guys, but often faced danger and even death. But even among these films, Cloak & Danger stands out as being particularly insane.

The movie is about Davey, a 12-year-old (or so) boy played by E.T.’s Henry Thomas. He loves adventures and spies, especially a fictional secret agent character named Jack Flack. Not only does Davey play as Jack in various role-playing/board games, the boy literally sees Flack as his imaginary friend, played by Dabney Coleman (who also plays Davey’s dad in the film), who constantly gives him advice. Although Davey doesn’t realize what he’s doing, the movie reveals he just lost his mom, and his father is mostly absent and ignores his son when he’s present. So Davey invented an imaginary friend in the image of his father that gives him advice and gets him into adventures.

A boy with an imaginary friend seems kind of normal, but Cloak & Dagger takes it to another level. On an errand, Davey is given an Atari game (titled Cloak & Dagger, and also about Jack Flack’s adventures, naturally) by a random man who immediately gets murdered by goons right in front of the kid. Eventually we learn the game has secret government plans on it which are unlocked when you get 1,329,000 points, which is why there are many, many bad guys who try to kill Davey to get it back.

Cloak & Dagger May Be the Most Messed-Up Kids Movie of the '80s

As a young boy, I remember watching this movie and thinking it was the coolest thing ever. (If you asked me, “Germain, did you and your friends run around your neighborhood with a video game pretending you were a spy?”, I’d plead the fifth.) As an adult, though, I was horrified at the constant peril this character is put in. Davey spends almost the entirety of the movie in mortal danger. He’s threatened, shot at and captured by the bad guys what seems like dozens of times. At one point, Davey is forced to hide in a car trunk with the corpse of one of his adult friends, murdered by the goons in their search for Davey. Jack Flack is the one who gives him the advice to hide in the trunk—correctly assuming that the bad guys wouldn’t think to look for him in there—but the movie still treats this as a totally reasonable, non-horrifically traumatic thing for Davey to have to do.

Of course, none of the non-murderous, non-imaginary adults in Davey’s life believe him when he tells them about his predicament—except for a kindly old couple who help him out of one scrape. Again, when I was an eight-year-old, this was awesome. Watching now, it’s insanely sad, not exciting, to see countless scenes of Davey, a kid who just lost his mother, running around a city talking to his imaginary friend, all while people are constantly trying to kill him and no one does anything. But that’s not even the worst part.

Cloak & Dagger May Be the Most Messed-Up Kids Movie of the '80s

The worst part is when Davey kills a guy.

Here’s how this goes down: Davey is being chased by three guys with guns. Jack gives him some spy maneuvers to get two of them to kill each other—again, the kid is forced to both dodge bullets and watch men die violently right in front of him—but the last then one corners Davey. Davey has picked up one of the dead goon’s guns, and the two are at a stand-off; but the goon doesn’t believe Davey will shoot him, mainly because Davey, almost sobbing, cries out that he doesn’t want to kill the bad guy.

Meanwhile, Jack Flack is egging Davey on to murder this man before he himself is murdered. But Davey is frozen. This is when the totally imaginary Jack somehow materializes in front of the goon, drawing his fire, and which inspires Davey to shoot his gun… killing the bad guy instantly. At which point Davey also has to watch Jack Flack, his best friend, die in front of him, because the bullets somehow killed him.

There is so much wrong with this. And I’m not even talking about the fact that at no point in this movie has the possibility of Jack Flack actually being real ever been suggested. No, I’m talking about the fact that Davey’s fucked-up mind somehow invents a scenario where his imaginary friend sacrifices himself to justify murder.

Now, if we’re being honest, Davey had no choice. He’s been getting shot at all day and, finally, he had a real gun in his hand, and one of the masterminds of the scheme in front of him with a machine gun. What was he going to do? Still, Cloak & Dagger takes the moment of a child being forced to murder an adult in self-defense and blows right by it.

This is insane—it’s the complete loss of a child’s loss of innocence, and it in the film it just doesn’t matter. Oh, the ’80s.

Cloak & Dagger May Be the Most Messed-Up Kids Movie of the '80s

What matters is getting to film’s climax, where we learn that the bad guys have planted a bomb on Kim, Davey’s friend and an eight-year-old girl, who has traveled to the airport for reasons too labyrinthine to explain. We also discover that the old couple who initially helped Davey are the real bad guys, and Davey has 20 minutes to get there before the bomb goes off and the old couple escape with the secrets-laden video game cartridge. Of course, Davey is also forced to ask a variety of strangers, at night, to drive him across town in the middle of the night.

Once everyone gets to the airport, the old couple hijacks a plane, kidnaps Davey, and manages to unknowingly bring the bomb on board. Thankfully, Davey’s dad pretends to be the plane’s pilot, comes aboard, and pushes Davey out of the plane before it explodes—before walking out of the flames himself. It’s all incredibly rushed after the first 80 percent of the movie moves like molasses. (Cloak & Dagger also ends with what may be the worst execution of a ticking clock narrative in the history of film, but that’s an article for another day.)

Cloak & Dagger May Be the Most Messed-Up Kids Movie of the '80s

“I don’t need [Jack Flack] anymore, I’ve got you, Dad!” says Davey at the end, in a moment that’s almost totally unearned. Obviously, Davey created Jack in the image of what he wants his dad to be. They share surface similarities but his dad is mostly a dick—he never trusts his kid, never engages with his son’s hobbies. He just goes to work and leaves a 12-year-old boy home alone when the boy thinks he’s going to be murdered. The only moment he finally realizes something may be up is when Davey calls him at work from a pay phone. Despite being imaginary and oblivious to danger, Jack Flack at least encouraged Davey, even if it was to do things that weren’t always right.

To put it mildly, Cloak & Dagger is definitely not as good as I remember. It’s slow, it’s severely messed up, and it makes the dangers the Goonies experienced look like they had a day at the playground. There’s nothing particularly cool about it being vaguely about a video game, and this certainly doesn’t make up for how incredibly cruel and brutal the film is to its kid characters.

Mostly, Cloak & Dagger serves as a prime example of why we should sometimes leave our beloved childhood obsessions in the past. Otherwise your positive memories end up as dead as the goon that 12-year-old was forced to murder.

http://ift.tt/2bQlGef

via Gizmodo
Cloak & Dagger May Be the Most Messed-Up Kids Movie of the ’80s

New Civil War Deleted Scene Reveals a Playful Nod to the Comic Book Captains America

New Civil War Deleted Scene Reveals a Playful Nod to the Comic Book Captains America

In the Marvel Cinematic Universe, Steve Rogers is the only Captain America—but that’s not the case in the comics, where many people have come to wield the shield. This fun little deleted scene from Civil War reveals that the movie was going to make sly reference to a few of those non-Steve Captains.

Revealed by Entertainment Weekly today, the short clip sees both Bucky—who, when Steve “died” at the end of the Civil War comic, took on the Captain America mantle—and very briefly Sam Wilson—who is one of the two currently active Captain Americas in Marvel’s comics, and the only one who isn’t being all weird and evil for silly, comic-booky reasons—both getting to use Captain America’s trusty shield during the fight at the airport between Team Tony and Team Cap.

It’s a fun moment, and it’s nice to see Bucky get some shield-envy, considering there were rumors floating around for ages that contracts were setting up Sebastian Stan as the potential replacement of Chris Evans as the MCU Cap at some point. That airport fight was already so jam-packed, though, you can see why this little moment for comic fans was sadly cut.

via Gizmodo
New Civil War Deleted Scene Reveals a Playful Nod to the Comic Book Captains America

Russian Superhero Film Guardians Trailer

Russian Superhero Film Guardians Trailerzoom in

It looks like Russia has its own Avengers type film and it actually looks really awesome. This is the first full trailer for the film Защитники (which translates to Guardians in English.) I’m not completely sure what everyone’s powers are, but one guy seems to be able to control rocks and looks like The Thing from Fantastic Four at one point, another guy is a human/bear hybrid. There are spider robots shooting missiles, and lots of other great action. It looks like a fun popcorn movie.

Here’s the description:

Set during the Cold War, a secret organization named “Patriot” gathered a group of Soviet superheroes, altering and augmenting the DNA of four individuals, in order to defend the homeland from supernatural threats.

The group includes representatives of the different nationalities of the Soviet Union, which each one of them have long been hiding their true identity. In hard times, they settled down to business and gather to defend their homeland.

via MightyMega
Russian Superhero Film Guardians Trailer

Standing desks in schools linked to lower BMIs

There’s new evidence that standing desks in classrooms can slow the increase in elementary school children’s body mass index (BMI)—a key indicator of obesity—by an average of 5.24 percentile points.

“Research around the world has shown that standing desks are positive for the teachers in terms of classroom management and student engagement, as well as positive for the children for their health, cognitive functioning and academic achievement,” says Mark Benden, an associate professor in environmental and occupational health at the Texas A&M School of Public Health and an author of the study published in the American Journal of Public Health.

“It’s literally a win-win, and now we have hard data that shows it is beneficial for weight control.”

Same results for boys and girls

Twenty-four classrooms at three elementary schools (eight in each of the three schools) in College Station, Texas, participated in the study. At each school, four classrooms were outfitted with stand-biased desks (which allow students to sit on a stool or stand at will) and four classrooms in each school acted as a control and utilized standard classroom desks.

The researchers followed the same students—193 in all—from the beginning of third grade to the end of fourth grade.

The researchers found that the students who had the stand-biased desks for both years averaged a three percent drop in BMI while those in traditional desks showed the two percent increase typically associated with getting older. However, even those who spent just one year in classrooms with stand-biased desks had lower mean BMIs than those students in traditional seated classrooms for their third and fourth grade years.

If you give kids too much food, they’ll overeat

In addition, there weren’t major differences between boys and girls, or between students of different races, suggesting that this intervention works across demographic groups.

“Classrooms with stand-biased desks are part of what we call an Activity Permissive Learning Environment (APLE), which means that teachers don’t tell children to ‘sit down,’ or ‘sit still’ during class,” Benden says. “Instead, these types of desks encourage the students to move instead of being forced to sit in poorly fitting, hard plastic chairs for six or seven hours of their day.”

Range of starting weights

Previous studies from Benden’s lab have shown that children who stand burn 15 percent more calories, on average, than those who sit in class, but this is the first study showing, over two years, that BMI decreases over time (versus controls) when using a stand-biased desk.

“It is challenging to just measure weight loss with children,” Benden says, “because children are supposed to be gaining weight as they get older and taller.”

At the beginning of this study, roughly 79 percent of the students were of normal weight category, 12 percent were overweight, and nine percent were obese, according to height and weight measurements made by the researchers. These are better numbers than nationally, where 14.9 percent of children were overweight and 16.9 percent were obese in 2012.

The fact that the students who started at a healthy weight benefited from stand-biased desks as much as they did might indicate that these desks help students who aren’t overweight maintain their BMI, while at the same time help those who start out overweight or obese get to a healthier weight.

The desks, designed by Benden and his team, are called stand-biased, not “standing” because they do include a tall stool the students can perch on if they so choose. They also include a footrest, a vital feature because it allows children to get their lower backs out of tension and reduce leg fatigue to stand more comfortably over time. These United States-patented desk designs are now licensed to Stand2Learn, which has commercialized the products through translational research focused on moving university studies to publicly available solutions.

“Sit less, move more,” Benden says. “That’s our message.”

The National Institutes of Health funded the study.

Source: Texas A&M University

The post Standing desks in schools linked to lower BMIs appeared first on Futurity.

via Futurity.org
Standing desks in schools linked to lower BMIs

How not to describe yourself if you want to get funded

We are the  Uber of our industry, applying curated, user-generated gamification to the sharing economy.

That’s pretty much it. That’s the sentence you’d craft if you’re looking to turn off venture and angel investors with a mission statement containing buzzwords that are losing popularity or were never compelling in the first place.

Using CrunchBase data, I queried startup buzzwords that were in wide use over the past few years, to see which have passed their peaks. The dataset includes words used in the descriptions of companies that have raised seed or venture funding in the past three years.

Here’s the list of what to avoid:

Sharing economy: Describing yourself as a sharing economy company constitutes a poor strategy for raising funding. That was true in 2014, when just six companies with that self-applied label raised seed or venture rounds. It was even more true in 2015, which saw three fundings, and this year, with two.

Curated: We are awash in data, and everyone could use a guide to help find the best and most relevant information. That may be why there were 58 companies funded last year that described themselves with the term curated. Startups providing curated platforms for music, games, handcrafted goods, matchmaking, fashion and art, to name a few, have all raised seed or angel funding in the past three years. But it appears the term is falling out of favor from overuse. So far this year, just 19 companies with “curated” in their business model descriptions raised funding.

“Uber of”: Go to a startup pitching event, and you’ll likely hear founders describe their startups as the Uber of their respective industry. There’s been an Uber of laundry, medical marijuana, liquor, lawn care and massages, to name a few. But while Uber has done a fabulous job attracting billions from investors, the “Uber of” startups have not. About 25 raised capital in the past three years, including seven this year. Overall, calling yourself the Uber of something seems to work better for non-U.S. startups, which accounted for six of the seven companies securing funding this year.

Gamification: Gamification became a buzzword in startup circles a few years ago, but it has not shown lasting popularity among investors. Just three companies with “gamification” in their descriptions have raised capital this year, while a total of 23 brought in funding over the past three years. This may less related to investor appetites than for the term “gamification” itself, a five syllable word that doesn’t exactly roll off the tongue.

User-generated: Facebook soared to a $360 billion valuation by getting the world addicted to user-generated content. But if you’re hoping to get funded with a business model focused on user-generated content, you’re probably out of luck. So far this year, just two companies describing themselves as using some form of user-generated content raised funding, with just 11 bringing in capital over the past three years.

Featured Image: Julia Tim/Shutterstock (IMAGE HAS BEEN MODIFIED)

via TechCrunch
How not to describe yourself if you want to get funded

John Oliver Tears Apart Ohio Charter Schools in New Segment

HBO’s Last Week Tonight turned its attention last night to the world of charter schools, showcasing how many of the 6,700 publically-funded-yet-privately-run schools across the country have failed to deliver a quality education, despite being touted frequently as a better alternative to public schools. Host John Oliver spent a good deal of the segment focusing on two states with some of the worst charter school track records in the country: Pennsylvania and Ohio.

“Ohio’s charter’s law was for decades so lax that even charter advocates have called it the Wild West,” stated Oliver before throwing to a clip of Ohio Governor John Kaisch comparing charter school competition with the competitiveness of pizza shops offering various amounts of pepperonis.

“It’s a little hard to hear the man who just defunded Planned Parenthood talk about the importance of choice,” riffed Oliver to an audience reaction of boos directed at Kasich.

Oliver continued by pointing out the lack of oversight with charter schools in Ohio, quoting a state audit that revealed that charter schools misspend public dollars four times more often than any other type of taxpayer funded agency. Some of the specific examples provided show how for-profit companies are able to siphon money out of the school while delivering abysmal educational results.

Online charter schools are also called out in the Last Week Tonight segment due to their lack of accountability when tracking student attendance.

“Some kids might need online education, but it’s got to be monitored better,” said Oliver. “One major study found that compared to kids in traditional public schools, students in online charters lost the equivalent of 72 days of learning in reading, and 180 days of learning in math during the course of a 180-day school year. And 180 minus 180 is, as those kids might put it, is three.”

While some of the charters in Ohio are performing well, the state of affairs in general seems pretty dour based on the information and research provided. If there’s any silver lining, Oliver points out that it’s the fact that Nevada seems to be performing worse than Ohio, so we’re technically not the worst state when it comes to overall charter school performance.

The Ohio-centric portion runs from around 9:15 to 17:05 in the video below, but the entire segment is worth watching as a whole for those interested in the educational system of Ohio:

RELATED: “Charter Schools are Failing in Columbus and Throughout Ohio

via ColumbusUnderground.com
John Oliver Tears Apart Ohio Charter Schools in New Segment

KFC Is Giving Away Sunscreen That Makes You Smell Like Fried Chicken

KFC Is Giving Away Sunscreen That Makes You Smell Like Fried Chicken

The summer is drawing to a close, but there’s still time to catch some rays, get a glowing tan, and smell like extra crispy fried chicken. Kentucky Fried Chicken—or KFC as it likes to be called now—is giving away tubes of sunscreen that make you smell like you’ve slathered yourself in the Colonel’s secret 11 herbs and spices. That’s a good thing, right?

KFC Is Giving Away Sunscreen That Makes You Smell Like Fried Chicken

In addition to protecting its customers from the harmful effects of too much sun exposure, this bizarre promotion is clearly an effort by KFC to turn sunbathers, swimmers, and everyone at the beach into walking subliminal advertisements for the chain’s fried fast food.

In one way, it’s genius. In another way, it sounds utterly disgusting. But whatever you feel about the promotion, just make sure you don’t lick your fingers after applying the sunscreen—it’s not edible.

You don’t need to buy anything to snag one of the limited edition tubes, you just need to head on over to KFC’s website and cough up all of your personal details, including a shipping address. And if you miss out, you can probably have the same experience by just smearing real fried chicken all over your body before heading to the beach. It will also give you an opportunity to get real friendly with the local seagulls.

[KFC via Twitter – BurgerBusiness]

via Gizmodo
KFC Is Giving Away Sunscreen That Makes You Smell Like Fried Chicken

What to Change On Your Bike If Your Hands or Legs Go Numb When Riding

If you spend a lot of time on a bike, you’re spending a lot of time locked into a position that better be comfortable. If it’s not, you could end up with aches and pains—or more likely, numbness.

Bike fitter and coach Paraic McGlynn tells Bicycling that tweaking your bike can fix most of the common issues that result in body parts falling asleep. If your hands are going numb, for example, you should check whether your handlebars are too far forward. For numbness in your legs, the culprit is the same as for numbness in your groin—an ill-fitting or improperly adjusted seat. And if your toes are going numb, you probably need a different pair of cycling shoes. Check out the link below for details on how to pinpoint your problem, and what to do about it.

How to Prevent Numbness on Your Next Ride | Bicycling

Photo via Visualhunt.com.

via Lifehacker
What to Change On Your Bike If Your Hands or Legs Go Numb When Riding

Top Most Overlooked MySQL Performance Optimizations: Q & A

Overlooked MySQL performance optimization

Overlooked MySQL Performance OptimizationsThank you for attending my 22nd July 2016 webinar titled “Top Most Overlooked MySQL Performance Optimizations“. In this blog, I will provide answers to the Q & A for that webinar.

For hardware, which disk raid level do you suggest? Is raid5 suggested performance-wise and data-integrity-wise?
RAID 5 comes with high overhead, as each write turns into a sequence of four physical I/O operations, two reads and two writes. We know that RAID 5s have some write penalty, and it could affect the performance on spindle disks. In most cases, we advise using alternative RAID levels. Use RAID 5 when disk capacity is more important than performance (e.g., archive databases that aren’t used often). Since write performance isn’t a problem in the case of SSD, but capacity is expensive, RAID 5 can help by wasting less disk space.

Regarding collecting table statistics, do you have any suggestions for analyzing large tables (over 300GB) since we had issues with MySQL detecting the wrong cardinality?
MySQL optimizer makes decisions about the execution plan (EXPLAIN), and statistics are re-estimated automatically and can be re-estimated explicitly when one calls the ANALYZE TABLE statement for the table, or the OPTIMIZE TABLE statement for InnoDB tables (which rebuilds the table and then performs an ANALYZE for the table).

When MySQL optimizer is not picking up the right index in EXPLAIN, it could be caused by outdated or wrong statistics (optimizer bugs aside). So, when you optimize the table you rebuild it so data are stored in a more compact way (assuming they changed a lot in the past) and then you re-estimate statistics based on some random sample pages checked in the table. As a result, you come up with statistics that are more correct for the data you have at the moment. This allows optimizer to get a better plan. When an explicit hint is added, you reduce possible choices for optimizer and it can use a good enough plan even with wrong statistics.

If you use versions 5.6.x and 5.7.x, and InnoDB tables, there is a way to store/fix statistics when the plans are good.  Using Persistent Optimizer Statistics prevents it from changing automatically. It’s recommended you run ANALYZE TABLE to calculate statistics (if really needed) during off peak time and make sure the table in question is not in use. Check this blogpost too.

Regarding the buffer pool, when due you think using multiple buffer pool instances make sense?
Multiple InnoDB buffer pools were introduced in MySQL 5.5, and the default value for it was 1. Now, the default value in MySQL 5.6 is 8. Enabling

innodb_buffer_pool_instances

 is useful in highly concurrent workloads as it may reduce contention of the global mutexes.

innodb_buffer_pool_instances

 helps to improve scalability in multi-core machines and having multiple buffer pools means that access to the buffer pool splits across all instances. Therefore, no single mutex controls the access pattern.

innodb_buffer_pool_instances

 only takes effect when set to 1GB (at minimum), and the total specified size for

innodb_buffer_pool

  is divided among all the buffer pool instances. Further, setting the innodb_buffer_pool_instances parameter is not a dynamic option, so it requires a server restart to take effect.

What do you mean “PK is appended to secondary index”
In InnoDB, secondary indexes are stored along with their corresponding primary key values. InnoDB uses this primary key value to search for the row in the clustered index. So, primary keys are implicitly added with secondary keys.

About Duplicate Keys, if I have a UNIQUE KEY on two columns, is it ok then to set a key for each of these columns also? Or should I only keep the unique key on the columns and get rid of regular key on each column also?
As I mentioned during the talk, for composite index the leftmost prefix is used. For example, If you have a UNIQUE INDEX on columns A,B as (A,B), then this index is not used for lookup for the query below:

SELECT * FROM test WHERE B='xxx';

For that query, you need a separate index on B column.

On myisam settings, doesn’t the MySQL and information_schema schemas require myisam? If so, are any settings more than default needing to be changed?
performance_schema uses the PERFORMANCE_SCHEMA storage engine, so only MySQL system database tables use the MyISAM engine. The MySQL system database is not used much and usually default settings for MyISAM engine are fine.

Will functions make my app slow compare than query?
I’m not sure how you’re comparing “queries” versus “stored functions.” Functions also need to transform, similar to the query execution plan. But it might be slower compare to well-coded SQL, even with the overhead of copying the resulting data set back to the client. Typically, functions have many SQL queries. The trade-off is that this does increase the load on the database server because more of the work is done on the server side and less is done on the client (application) side.

Foreign key will make my fetches slower?
MySQL enforces referential integrity (which ensures data consistency between related tables) via foreign keys for the InnoDB storage engine. There could be some overhead of this for the INSERT/UPDATE/DELETE foreign key column, which has to check if the value exists in a related column of other tables. There could be some overhead for this, but again it’s an index lookup so the cost shouldn’t be high. However, locking overhead comes into play as well. This blogpost from our CEO is informative on this topic. This especially affect writes, but I don’t think FK fetches slower for SELECT as it’s an index lookup.

Large pool size can have a negative impact to performance? About 62GB of pool size?
The InnoDB buffer pool is by far the most important option for InnoDB Performance, as it’s the main cache for data and indexes and it must be set correctly. Setting it large enough (i.e., larger than your dataset) shouldn’t cause any problems as long as you leave enough memory for OS needs and for MySQL buffers (e.g., sort buffer, join buffer, temporary tables, etc.).

62GB doesn’t necessarily mean a big InnoDB buffer pool. It depends on how much memory your MySQL server contains, and what the size of your total InnoDB dataset is. A good rule of thumb is to set the InnoDB buffer pool size as large as possible, while still leaving enough memory for MySQL buffers and for OS.

You find duplicate, redundant indexes by looking at information_schema.key_column_usage directly?
The key_column_usage view provides information about key columns constraints. It doesn’t provide information about duplicate or redundant indexes.

Can you find candidate missing indexes by looking at the slow query log?
Yes, as I mentioned you can find unused indexes by enabling log_queries_not_using_indexes. It writes to

slow_query_log

. You can also enable the user_statistics feature which adds several information_schema tables, and you can find un-used indexes with the help of user_statistics. pt-index-usage is yet another tool from Percona toolkit for this purpose. Also, check this blogpost on this topic.

How to find the unused indexes? They also have an impact on performance.
Unused indexes can be found with the help of the pt-index-usage tool from Percona toolkit as mentioned above. If you are using Percona Server, you can also use User Statistics feature. Check this blogpost from my colleague, which shows another technique to find unused indexes.

As far as I understand, MIXED will automatically use ROW for non-deterministic and STATEMENT for deterministic queries. I’ve been using it for years now without any problems. So why this recommendation of ROW?

In Mixed Mode, MySQL uses statement-based replication for most queries, switching to row-based replication only when statement-based replication would cause an inconsistency. We recommend ROW-based logging because it’s efficient and performs better as it requires less row locks. However, RBR can generate more data if a DML query affects many rows and a significant amount of data needs to be written to the binary log (and you can configure

binlog_row_image

 parameter to control the amount of logging). Also, make sure you have good network bandwidth between master/slave(s) for RBR, as it needs to send more data to slaves. Another important thing to get best of the performance with ROW-based replication is to make sure all your database tables contain a Primary Key or Unique Key (because of this bug http://ift.tt/XAfSeJ?id=53375).

Can you give a brief overview of sharding…The pros and cons also.
With Sharding, database data is split into multiple databases with each shard storing a subset of data. Sharding is useful to scale writes if you have huge dataset and a single server can’t handle amount of writes.

Performance and throughput could be better with sharding. On the other had, it requires lots of development and administration efforts. The application needs to be aware of the shards and keep track of which data is stored in which shard. You can use MySQL Fabric framework to manage farms of MySQL Servers. Check for details in the manual.

Why not mixed replication mode instead of row-based replication ?
As I mentioned above, MIXED uses a STATEMENT-based format by default, and converts to ROW-based replication format for non-deterministic queries. But ROW-based format is recommended as there could still be cases where MySQL fails to detect non-deterministic query behavior and replicates in a STATEMENT-based format.

Can you specify a few variables which could reduce slave lag?
Because of the single-threaded nature of MySQL (until MySQL 5.6), there is always a chance that a MySQL slave can lag from the master. I would suggest considering the below parameters to avoid slave lag:

  • innodb_flush_log_at_trx_commit <> 1, Either set it t or 0 however, it could cause you 1 second of data loss in case of crash.
  • innodb_flush_method = O_DIRECT, for unix like operating system O_DIRECT is recommended to avoid double buffering. If your InnoDB data and log files are located on SAN then O_DIRECT is probably not good choice.
  • log_bin = 0, Disable binary logging (if enabled) to minimize extra Disk IO.
  • sync_binlog = 0, Disable sync_binlog.

Those above parameters would definitely help to minimize slave lag. However, along with that make sure your slave(s) hardware is as strong as the master. Make sure your read queries are fast enough. Don’t overload slave to much, and distribute read traffic evenly between slave(s). Also, you should have the same table definitions on slave(s) as the master (e.g., master server indexes must exists on slave(s) tables too). Last but not least, I wrote a blogpost on how to diagnose and cure replication lag. It might be useful for further reading.

PlanetMySQL Voting: Vote UP / Vote DOWN
via Planet MySQL
Top Most Overlooked MySQL Performance Optimizations: Q & A

Emulating Sequences in MySQL and MariaDB

Sequences are objects defined by the SQL standard that are used to create monotonically increasing sequences of numeric values. Whenever nextval is called on a sequence object, it generates and returns the next number in the sequence. For MySQL and MariaDB users, this might sound similar to MySQL’s AUTO_INCREMENT columns, but there are some differences: Sequences are defined by the … Read More
PlanetMySQL Voting: Vote UP / Vote DOWN
via Planet MySQL
Emulating Sequences in MySQL and MariaDB