Available for projects & agency overflow · Quick reply, from the person who does the work

SQL query: definition

An SQL query is an instruction written in SQL (Structured Query Language) sent to a database to read, add, change or delete information.

Describe my issue Send a message

The language that drives the store's data

SQL rests on a few key instructions: SELECT to read, INSERT to add, UPDATE to change, DELETE to remove. Every page on PrestaShop or WooCommerce triggers dozens of queries: displaying a product page queries the products table and the prices table, confirming an order inserts rows into several tables at once.

For an online retailer, understanding that SQL queries exist helps explain why some back-office actions take time, or why a poorly coded extension can slow down the whole site: a badly written query, run on every page against a catalogue of several thousand products, can severely hurt performance. It's also the language a developer uses, with care, to fix a piece of data directly in phpMyAdmin when no solution is available through the back office.

Frequently asked questions

Do you need to know how to write SQL to run a store day to day?
No, the back office generates the necessary queries itself. Manual SQL only comes into play for special cases: one-off fixes, exports or technical diagnostics.
Can a slow SQL query explain a sluggish site?
Yes, it's a common cause on large catalogues: a query that scans an entire table for lack of a suitable index can add several seconds to load time.
Where can you concretely see the queries a store runs?
On PrestaShop it's the profiler, not debug mode: the _PS_DEBUG_PROFILING_ constant in config/defines.inc.php prints, in the page footer, the list of queries executed, sorted slowest first. Debug mode (_PS_MODE_DEV_) only displays errors. On WordPress, dedicated plugins provide similar tracking.

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

contexte
plateforme (facultatif)
question (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.