# 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.

- Source canonique : [https://allaux.fr/en/glossaire/requete-sql](https://allaux.fr/en/glossaire/requete-sql)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## 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.

## To avoid

> Running an UPDATE or DELETE query without a precise WHERE clause can change or delete data across an entire table. A backup before any manual SQL intervention is essential.

## FAQ

### 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.
