Tuesday, November 8, 2016

Beaver in Action: Practical MySQL Optimization

Clients with an existing application sometimes ask me to fix bugs, improve efficiency by speeding up the application, or add a new feature to some existing software. The first stage of this is researching the original code – so-called reverse engineering. With SQL databases, it is not always immediately obvious which SQL queries were executed - especially if these queries were generated by a framework or some kind of external library.

fiery performance indicator, akin to speed measure in cars

In this article, I will talk specifically about MySQL and present a common optimization use case which might come in handy if you run into a similar problem one day.

MySQL allows you to save all queries into a log.

Open MySQL console:

mysql --user=USERNAME --password=PASSWORD

This turns on the log:

set global general_log = "on";

This saves it to a table:

set global log_output = "table";

To view the logs you've saved:

select * from mysql.general_log;

To compress your logs:

truncate mysql.general_log;

However, viewing logs in the MySQL's console is not as convenient as it could be because:

  • There are no highlighting or formatting options
  • It's hard to locate problematic queries among the huge list you get from running parallel processes.

As I often work with logs, I developed a tool called "Beaver MySQL logger" to optimize and make them easier for the user to analyze.

Continue reading %Beaver in Action: Practical MySQL Optimization%


by Kirill Zhirnov via SitePoint

Food and Wine Hualalai

Events, restaurants, and gatherings. Four Seasons Hualalai offers rich and memorable food experiences from its secluded location on the Big Island of Hawaii.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

APA Smart

Every house, office, and factory can work in a smarter, more intuitive way with the system provided by Building Management System. APA Smart has an outstanding idea for presenting all the possibilities of this system in the showroom, with Chilid resp


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Arkit One Page HTML Template

Arkit is a Responsive One Page HTML5 Template for architects, designers or agencies. It’s based on Bootstrap framework, clean and minimal, fully responsive and customizable.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Sketchbook by Ales Nesetril

Sketchbook by Ales Nesetril

Gorgeous little One Pager showcasing a beautiful sketchbook by Ales Nesetril. Lovely touch "unboxing" the product as you scroll.

by Rob Hope via One Page Love

Dandyne

Dandyne

Minimal, horizontal scrolling One Pager for French clothing brand, Dandyne.

by Rob Hope via One Page Love

AtoZ CSS Screencast: The rotateY CSS Transform

In the previous episode we learned about the transform property and the value translateX().

In this episode we’ll be digging deeper into transforms and manipulating elements in 3D.

In this episode we’ll learn all about:

  • 3D space in CSS
  • How to rotate elements around their vertical and horizontal axis
  • And how perspective works

3D space

The browser acts a bit like a two-dimensional canvas on which we layout blocks of content and style images, text and links to create a website or web app.

If you recall high-school maths, when looking at a graph there is a horizontal x-axis and a vertical y-axis.

There’s a third axis that comes directly out from the screen, known as the z-axis. We’ll look into this more in the final episode of this season when we talk about z-index. For now, we just need to know that there is a third dimension and we can transform elements from being in a 2D plane to a 3D one using 3D transforms.

When dealing with elements in 3D space, we can ensure they appear visually as if they are in a third plane by setting the transform-style property to preserve-3d on the parent container.

This will allow all child elements to appear in 3D space. If this property is not set, elements will appear flattened and the effect won’t be as obvious.

Rotate

Rotation can be very useful in many aspects of design - from a complete 180 to just a small handful of degrees.

The default axis of rotation is the z-axis.

The amount of rotation can be specified in degrees or radians. I vaguely remember radians from maths class but I always use degrees because they feel a lot more comfortable to me.

I’ve got an image here with a white border around it and a drop shadow. If I wanted to rotate the image, I can do so by using the transform property and the the rotate() function.

A positive value with rotate clockwise and a negative value, anti-clockwise.

Continue reading %AtoZ CSS Screencast: The rotateY CSS Transform%


by Guy Routledge via SitePoint