- [Instructor] One of your most common performance domains…you'll need to deal with, is your database code,…but if you use a modern framework,…many frameworks hide the raw SQL…behind an object relational mapping…and database abstractional layers,…so it can be hard to find your slow SQL queries.…However, we're going to walk through a few techniques…to help you out.…The simplest way is to figure out which pages…in your application are the slowest.…Refer back to our Xdebug section…on figuring out both how to record and time your slow pages.…
After you turn on your Xdebug logging,…you can than use this to then determine…how much time you're spending talking to your database.…All of the most common database engines,…include ways of logging your SQL queries…with a feature called query logging.…In MySQL, you can turn on query logging…by editing your configuration file…and adding it to set the general log to one or true,…and then set a path to log the output to.…In Postgres, logging is also a pretty much a setup…of just choosing a destination,…
Author
Released
9/21/2017- General optimization techniques and tools
- PHP and Xdebug
- Opcode cache
- Optimization in PHP
- Upgrading PHP
- Macro vs. Micro optimization
- HTTP caching
- HTTP compression
- HTTP/2
Skill Level Intermediate
Duration
Views
Related Courses
-
PHP 7 New Features
with Kevin Skoglund1h 4m Intermediate -
PHP: Test-Driven Development with PHPUnit
with Justin Yost1h 54m Intermediate -
Consuming RESTful APIs in PHP with Guzzle
with Justin Yost2h 12m Intermediate
-
Introduction
-
Welcome54s
-
-
1. Optimization Basics
-
Measure and test4m 57s
-
2. PHP and Xdebug
-
Xdebug: The basics5m 9s
-
Xdebug: Stack traces4m 57s
-
Xdebug: Function traces3m 21s
-
Opcode cache7m 59s
-
-
3. Optimization in PHP
-
Upgrade PHP8m 28s
-
Queue work for later8m 30s
-
Promise your PHP5m 39s
-
Macro vs. Micro optimization2m 55s
-
-
4. Optimizate Your Database
-
Explain SQL5m 45s
-
Indexing SQL6m 16s
-
Caching SQL4m 20s
-
5. Optimize the Web
-
Build your HTML smartly7m 42s
-
HTTP caching6m 29s
-
HTTP compression5m 27s
-
HTTP/27m 31s
-
Minify all the things4m 11s
-
CDN all the things4m 45s
-
-
6. Hardware Up and Out
-
Scaling the rest of the way2m 13s
-
Conclusion
-
Next steps39s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Find your slow and common SQL