{"id":16818251,"url":"https://github.com/igr/pgimdb","last_synced_at":"2025-03-17T13:30:08.752Z","repository":{"id":198397948,"uuid":"700748762","full_name":"igr/pgimdb","owner":"igr","description":"Reading 29E6 records","archived":false,"fork":false,"pushed_at":"2023-10-19T09:54:50.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T23:26:49.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-05T08:10:02.000Z","updated_at":"2023-10-05T08:15:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"938680bd-7c24-447a-940c-3fb5cf947156","html_url":"https://github.com/igr/pgimdb","commit_stats":null,"previous_names":["igr/pgimdb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igr%2Fpgimdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igr%2Fpgimdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igr%2Fpgimdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igr%2Fpgimdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igr","download_url":"https://codeload.github.com/igr/pgimdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244041214,"owners_count":20388203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T10:49:35.627Z","updated_at":"2025-03-17T13:30:08.718Z","avatar_url":"https://github.com/igr.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Postgres IMDB test\n\n+ `29 671 440` movies.\n+ `8` Gb memory.\n+ Postgres 16.0\n+ Spring + MyBatis\n\n## Setup\n\n+ Download \"PostgreSQL Dump of IMDB Data\" from https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/2QYZBT\n+ Run docker compose\n\n## Test\n\nTest - read all movies into the memory:\n\n```bash\nhttp http://localhost:8080/movies/memory\n```\n\nTest - read all movies using a cursor:\n\n```bash\nhttp http://localhost:8080/movies/cursor\n```\n\n| Fetch size | Response Time | Memory usage |\n|------------|---------------|--------------|\n| -          | -             | OOM          |\n| 10_000_000 | 74791         | 2-3.5 GB     |\n| 1_000_000  | 74270         | 400-770 MB   |\n| 100_000    | 78212         | 150-300 MB   |\n| 10_000     | 88150         | 100-160 MB   |\n| 1_000      | 110745        | 60-130 MB    |\n\n### Memory usage\n\n+ `10_000_000` ![](img/10_000_000.png)\n+ `1_000_000` ![](img/1_000_000.png)\n+ `100_000` ![](img/100_000.png)\n+ `10_000` ![](img/10_000.png)\n+ `1_000` ![](img/1_000.png)\n\n### Fitting\n\n![](img/exp.png)\n\n## Conclusion\n\nAccording to the fit graph, sweet spot is somewhere between `10^4` and `10^5`.\n\n⚠️ This is 5-min guessed conclusion. The answer depends on traffic, usage, real data etc. ⚠️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figr%2Fpgimdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figr%2Fpgimdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figr%2Fpgimdb/lists"}