This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const list_of_primes = [2, 3, 5]; | |
function* prime_generator() { | |
for (prime of list_of_primes) { | |
yield prime; | |
} | |
for(let next_possible_prime = list_of_primes.slice(-1)[0] + 2;;next_possible_prime += 2) { | |
const max_check = Math.ceil(Math.sqrt(next_possible_prime)); | |
for (known_prime of list_of_primes) { | |
if (known_prime > max_check) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- table + index sizes | |
SELECT | |
table_name, | |
pg_size_pretty(table_size) AS table_size, | |
pg_size_pretty(indexes_size) AS indexes_size, | |
pg_size_pretty(total_size) AS total_size | |
FROM ( | |
SELECT | |
table_name, | |
pg_table_size(table_name) AS table_size, |