← Back to context

Comment by nl

5 years ago

This might be true.

But this approach lets you actually work out what the optimal size is:

  select sum(length(country_code) + length(long_name)) from wdi_country;

gives: 6307

Or on average:

  select sum(length(country_code) + length(long_name))/count(*) from wdi_country;

gives: 23

(Note that it doesn't seem possible to use aggregation functions with a limit clause)