{"id":21806237,"url":"https://github.com/amhsirak/pg-index","last_synced_at":"2025-10-10T01:39:52.322Z","repository":{"id":186712038,"uuid":"675613820","full_name":"amhsirak/pg-index","owner":"amhsirak","description":"Indexing on a Postgres table containing 50 million rows ","archived":false,"fork":false,"pushed_at":"2023-08-07T14:32:54.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T04:27:30.009Z","etag":null,"topics":["database","db-index","indexing","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amhsirak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-08-07T10:23:17.000Z","updated_at":"2024-03-10T12:50:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"8cf1712f-902d-4b8d-8180-8239a2b9ae24","html_url":"https://github.com/amhsirak/pg-index","commit_stats":null,"previous_names":["karishmashuklaa/pg-index","amhsirak/pg-index"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fpg-index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fpg-index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fpg-index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amhsirak%2Fpg-index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amhsirak","download_url":"https://codeload.github.com/amhsirak/pg-index/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244759899,"owners_count":20505712,"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":["database","db-index","indexing","postgresql","sql"],"created_at":"2024-11-27T12:18:41.206Z","updated_at":"2025-10-10T01:39:47.274Z","avatar_url":"https://github.com/amhsirak.png","language":null,"readme":"### What is this?\nSimple experiment to apply database indexing to improve query performance for a hypothetical `customer` table containing 50 million rows. Partial Index is created on `country` column, containing two distinct values - 'India' \u0026 'United Kingdom'\n\n### Test Environment\n- PostgreSQL 13\n- PgAdmin 4\n- Windows 11 HSL (AMD Ryzen 5)\n\n### Results\n\nFor the query `SELECT * FROM customers WHERE country='United Kingdom';`\n\nUsing `EXPLAIN ANALYZE` query for obtaining actual run-time statistics on the required statement before and after indexing.\n\n- Query Execution Time without index: 41836.270 ms\n- Query Execution Time with index: 24254.644 ms\n- Improvement in query execution time ~42.03%\n\nRelated article can be found \u003ca href=\"https://dev.to/karishmashukla/how-to-improve-the-performance-of-your-database-by-indexing-large-tables-1j17\"\u003ehere.\u003c/a\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famhsirak%2Fpg-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famhsirak%2Fpg-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famhsirak%2Fpg-index/lists"}