explain analyse select true;
╔════════════════════════════════════════════════════════════════════════════════════╗
║ QUERY PLAN ║
╠════════════════════════════════════════════════════════════════════════════════════╣
║ Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.016..0.016 rows=1 loops=1) ║
║ Planning time: 0.073 ms ║
║ Execution time: 0.109 ms ║
╚════════════════════════════════════════════════════════════════════════════════════╝
explain analyze select true;
╔════════════════════════════════════════════════════════════════════════════════════╗
║ QUERY PLAN ║
╠════════════════════════════════════════════════════════════════════════════════════╣
║ Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.004..0.005 rows=1 loops=1) ║
║ Planning time: 0.030 ms ║
║ Execution time: 0.036 ms ║
╚════════════════════════════════════════════════════════════════════════════════════╝
Is it feature or documented function (analyse = analyze)?
Description. ANALYZE collects statistics about the contents of tables in the database, and stores the results in the pg_statistic system catalog. Subsequently, the query planner uses these statistics to help determine the most efficient execution plans for queries.
EXPLAIN ANALYZE will actually run the query, so be careful with updates or deletes! In those cases, consider not using ANALYZE, or you might perhaps wrap the entire statement in a transaction that you can roll back.
The most powerful tool at our disposal for understanding and optimizing SQL queries is EXPLAIN ANALYZE , which is a Postgres command that accepts a statement such as SELECT ... , UPDATE ... , or DELETE ... , executes the statement, and instead of returning the data provides a query plan detailing what approach the ...
As mentioned it's only to support British vs American English. There is no difference in functionality. Even the source code has a mention of British spelling.
There is also no difference in the timing. If you run those a million times you will not see any reasonable difference in times. Running them once may show some difference, but one is not actually faster than the other.
You can also check the parser source code. Both get parsed into exactly the same:
analyze_keyword:
ANALYZE {}
| ANALYSE /* British */ {}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With