8
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)?

7
  • 2
    Analyze is used in the US and Canada, while analyse in Britain and Australia. Probably made synonyms to avoid confusion. Commented Dec 3, 2016 at 3:13
  • @Andre I heared about "color" and "colour", "czar" and "caezar" and so on. Learning the foreign languages is a really interesting thing! Thank you! Commented Dec 3, 2016 at 3:25
  • That's ok, but why analyze is so much faster than analyse?! Commented Dec 3, 2016 at 3:31
  • @klin Probably it is because it is the second one? (sorry for inappropriate articles if any) Commented Dec 3, 2016 at 3:33
  • Hmmm, my server also prefers analyze. Don't worry, (the?) English articles is my nightmare. Commented Dec 3, 2016 at 3:40

1 Answer 1

16

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 */                 {}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.