DB propertytoolkit - zebrainvest/postgres GitHub Wiki

propertytoolkit Production Database

The production database is called propertytoolkit, and runs in a PostgreSQL v.15 on Linux.

At the time of this writing, the database was 125GB large (about half of the size of the disk).

The schema of the database can be found in this Github repo, in schema_dump.sql.

Tables

The lists of tables below can be re-generated with the following SQL statement:

SELECT string_agg(
    format('* %s (%s)', table_name, to_char(get_row_count(format('%s.%s', table_schema, table_name)::regclass), 'FM9,999,999')),
    E'\n' ORDER BY table_name)
FROM information_schema.tables
WHERE table_schema = 'public' AND table_type = 'BASE TABLE'

Replace 'public' in the snippet above with the relevant schema to (re)generate.

Schema public

  • air_availability (133,636,483)
  • air_listing_map (10,458,426)
  • air_listings (340,161)
  • air_price (8,921,842)
  • air_status (446,156)
  • brand_aliases (38,991)
  • brand_aliases_backup (2,920,003)
  • certificates_depc (27,369,071)
  • certificates_non_depc (1,351,384)
  • cities (85)
  • hmo_index (2,439,275)
  • hmo_listings_afs (22,294)
  • hmo_listings_spr (386,637)
  • hmo_listings_uni (39,271)
  • listing_scrapper_data (2,920,651)
  • ni_listings (0)
  • ni_results (0)
  • ni_updates (0)
  • old_price_paid (29,930,500)
  • osopenuprn (40,825,714)
  • outcodes (2,951)
  • price_paid (30,155,887)
  • price_paid_uprn_matches (29,538,226)
  • propertytool (8,115,555)
  • proxies (43)
  • rightmove_region (475)
  • target_proxies (123)
  • uk_locations (7,834)
  • updated_property_status (14,124,474)
  • uprn_addresses (18,686,104)
  • uprn_records (40,744,085)

Schema eth

  • dup_ppid (29,999)
  • pp_addresses (70,445)
  • pp_counties (132)
  • pp_districts (467)
  • pp_localities (23,800)
  • pp_postcodes (1,312,548)
  • pp_streets (324,423)
  • pp_towns (1,156)
  • price_paid_data (104,693)

Stored Procedures

In public schema