Articles | Mohamed Said      [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://msaied.com) - [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [About](https://msaied.com#about)

           [  Contact](https://msaied.com#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://msaied.com)
- [ProjectsCase studies](https://msaied.com/projects)
- [ArticlesEngineering notes](https://msaied.com/articles)
- [CertificatesCredentials](https://msaied.com/certificates)
- [AboutHow I work](https://msaied.com#about)
- [ContactGet in touch](https://msaied.com#contact)

  [Start a conversation](https://msaied.com#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

  1. [Home](https://msaied.com)
2. /
3. Articles

  Engineering library
====================

 37 articles by Mohamed Said on Laravel, PHP, databases, APIs and infrastructure, written from production work.

 Search articles ⌕×Search 

    Topic hubs
----------

←→

- [AI48 articles](https://msaied.com/articles?category=ai&search=postgresql&sort=new)
- [Composer Pacakge80 articles](https://msaied.com/articles?category=composer-pacakge&search=postgresql&sort=new)
- [Filament27 articles](https://msaied.com/articles?category=filament&search=postgresql&sort=new)
- [Laravel266 articles](https://msaied.com/articles?category=laravel&search=postgresql&sort=new)
- [Livewire13 articles](https://msaied.com/articles?category=livewire&search=postgresql&sort=new)
- [Open Source44 articles](https://msaied.com/articles?category=open-source&search=postgresql&sort=new)
- [PHP27 articles](https://msaied.com/articles?category=php&search=postgresql&sort=new)
- [Tips &amp; Tricks32 articles](https://msaied.com/articles?category=tips-tricks&search=postgresql&sort=new)

  Topics
------

 [All topics](https://msaied.com/articles?search=postgresql&sort=new) [AI 48](https://msaied.com/articles?category=ai&search=postgresql&sort=new) [Composer Pacakge 80](https://msaied.com/articles?category=composer-pacakge&search=postgresql&sort=new) [Filament 27](https://msaied.com/articles?category=filament&search=postgresql&sort=new) [Laravel 266](https://msaied.com/articles?category=laravel&search=postgresql&sort=new) [Livewire 13](https://msaied.com/articles?category=livewire&search=postgresql&sort=new) [Open Source 44](https://msaied.com/articles?category=open-source&search=postgresql&sort=new) [PHP 27](https://msaied.com/articles?category=php&search=postgresql&sort=new) [Tips &amp; Tricks 32](https://msaied.com/articles?category=tips-tricks&search=postgresql&sort=new)    37 articles
------------

Topics    Sort articles Newest first  Oldest first  Sort  

 [Search: postgresql ×Remove search](https://msaied.com/articles?sort=new) [ Clear filters](https://msaied.com/articles) 

  [![](https://cdn.msaied.com/790/3b305e067cf21c59b93a26f96786fabd.png)](https://msaied.com/articles/postgresql-window-functions-in-laravel-ranking-running-totals-and-gap-detection-3)17 Oct 2026·2 min read 

### [PostgreSQL Window Functions in Laravel: Ranking, Running Totals, and Gap Detection](https://msaied.com/articles/postgresql-window-functions-in-laravel-ranking-running-totals-and-gap-detection-3) 

 Window functions let you compute rankings, running totals, and gaps directly in SQL without pulling rows into PHP. Learn how to use them cleanly from Laravel's query builder.

   [![](https://cdn.msaied.com/755/2afbdc0a82de6bd61d3739c09554dda0.png)](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-casting-without-the-mess)8 Oct 2026·4 min read 

### [PostgreSQL JSONB in Laravel: Indexing, Querying, and Casting Without the Mess](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-casting-without-the-mess) 

 JSONB columns unlock flexible schemas, but misused they become performance traps. Learn how to index, query, and cast JSONB in Laravel with precision — no raw SQL sprawl.

   [![](https://cdn.msaied.com/720/3e3d256d54dd4036099122e0b035e482.png)](https://msaied.com/articles/postgresql-recursive-ctes-in-laravel-hierarchical-data-without-the-orm-gymnastics)30 Sep 2026·2 min read 

### [PostgreSQL Recursive CTEs in Laravel: Hierarchical Data Without the ORM Gymnastics](https://msaied.com/articles/postgresql-recursive-ctes-in-laravel-hierarchical-data-without-the-orm-gymnastics) 

 Recursive CTEs let PostgreSQL walk tree structures in a single query. Learn how to wire them into Laravel's query builder, map results to Eloquent models, and avoid the classic infinite-loop trap.

   [![](https://cdn.msaied.com/665/ced6904aad758906b6047d70ea25e267.png)](https://msaied.com/articles/partial-indexes-and-covering-indexes-in-postgresql-a-laravel-developers-guide-1)13 Sep 2026·4 min read 

### [Partial Indexes and Covering Indexes in PostgreSQL: A Laravel Developer's Guide](https://msaied.com/articles/partial-indexes-and-covering-indexes-in-postgresql-a-laravel-developers-guide-1) 

 Learn how partial and covering indexes eliminate wasted index space and redundant heap fetches in Laravel apps, with real migration examples and EXPLAIN output that proves the gains.

   [![](https://cdn.msaied.com/649/9ce340f6d71d0052cb3d0eaba1f08754.png)](https://msaied.com/articles/postgresql-window-functions-in-laravel-ranking-running-totals-and-gap-detection-2)9 Sep 2026·4 min read 

### [PostgreSQL Window Functions in Laravel: Ranking, Running Totals, and Gap Detection](https://msaied.com/articles/postgresql-window-functions-in-laravel-ranking-running-totals-and-gap-detection-2) 

 Window functions let you compute rankings, running totals, and detect gaps in sequences without subqueries or application-side loops. Here is how to use them cleanly from Laravel's query builder.

   [![](https://cdn.msaied.com/643/656efe6f0c30b559bcdb27456edcc366.png)](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-casting-without-the-pain-2)8 Sep 2026·3 min read 

### [PostgreSQL JSONB in Laravel: Indexing, Querying, and Casting Without the Pain](https://msaied.com/articles/postgresql-jsonb-in-laravel-indexing-querying-and-casting-without-the-pain-2) 

 JSONB columns unlock flexible schemas inside PostgreSQL, but misused they become slow blobs. Learn how to index, query, and cast JSONB correctly in Laravel Eloquent without sacrificing type safety.

   [![](https://cdn.msaied.com/607/ac508dd27011f0f2c57b0bee7707b740.png)](https://msaied.com/articles/recursive-ctes-and-hierarchical-data-in-laravel-with-postgresql)29 Aug 2026·3 min read 

### [Recursive CTEs and Hierarchical Data in Laravel with PostgreSQL](https://msaied.com/articles/recursive-ctes-and-hierarchical-data-in-laravel-with-postgresql) 

 Learn how to query trees and hierarchies—categories, org charts, threaded comments—using recursive CTEs in PostgreSQL, wired cleanly into Eloquent with raw expressions and custom scopes.

   [![](https://cdn.msaied.com/558/40ed2a1b013ac76dc4d08f1a245c5747.png)](https://msaied.com/articles/postgresql-partial-and-covering-indexes-for-laravel-query-performance)17 Aug 2026·4 min read 

### [PostgreSQL Partial and Covering Indexes for Laravel Query Performance](https://msaied.com/articles/postgresql-partial-and-covering-indexes-for-laravel-query-performance) 

 Learn how partial and covering indexes eliminate unnecessary index bloat and let PostgreSQL satisfy queries entirely from the index, with real Laravel migration examples and EXPLAIN output.

   [![](https://cdn.msaied.com/546/f045f6411aa801b18d8a06d0518d540a.png)](https://msaied.com/articles/postgresql-window-functions-in-laravel-ranking-running-totals-and-gap-detection-1)14 Aug 2026·4 min read 

### [PostgreSQL Window Functions in Laravel: Ranking, Running Totals, and Gap Detection](https://msaied.com/articles/postgresql-window-functions-in-laravel-ranking-running-totals-and-gap-detection-1) 

 Window functions let you compute rankings, running totals, and gaps directly in SQL without self-joins or PHP loops. Here is how to use them cleanly from Laravel's query builder.

   ← Newer1. 1
2. [2](https://msaied.com/articles?search=postgresql&page=2)
3. [3](https://msaied.com/articles?search=postgresql&page=3)
4. [4](https://msaied.com/articles?search=postgresql&page=4)
5. [5](https://msaied.com/articles?search=postgresql&page=5)

 1 / 5 [Older →](https://msaied.com/articles?search=postgresql&page=2)   

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://msaied.com#contact) 

Topics
------

Close 

 [All topics](https://msaied.com/articles) [AI (48) ](https://msaied.com/articles?category=ai&search=postgresql&sort=new) [Composer Pacakge (80) ](https://msaied.com/articles?category=composer-pacakge&search=postgresql&sort=new) [Filament (27) ](https://msaied.com/articles?category=filament&search=postgresql&sort=new) [Laravel (266) ](https://msaied.com/articles?category=laravel&search=postgresql&sort=new) [Livewire (13) ](https://msaied.com/articles?category=livewire&search=postgresql&sort=new) [Open Source (44) ](https://msaied.com/articles?category=open-source&search=postgresql&sort=new) [PHP (27) ](https://msaied.com/articles?category=php&search=postgresql&sort=new) [Tips &amp; Tricks (32) ](https://msaied.com/articles?category=tips-tricks&search=postgresql&sort=new)  

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://msaied.com)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://msaied.com/sitemap.xml)
