---
title: "Discussion on \"How to Prefetch Across GenericForeignKeys When You Can't Change the Schema\" | Hashnode"
description: "Discussion on \"How to Prefetch Across GenericForeignKeys When You Can't Change the Schema\". You don't always control the schema you work with. Sometimes you inherit a codebase where GenericForeignKey is threaded through the models, and a migration isn't on the table. Loading a page of 20 aud"
url: "https://hashnode.com/posts/how-to-prefetch-across-genericforeignkeys-when-you-can-t-change-the-schema/6a4b7fdee0bc808d56317036"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Prefetch Across GenericForeignKeys When You Can't Change the Schema](https://blog.acel.dev/how-to-prefetch-across-genericforeignkeys-when-you-can-t-change-the-schema?utm_source=hashnode&utm_medium=feed)

You don't always control the schema you work with. Sometimes you inherit a codebase where GenericForeignKey is threaded through the models, and a migration isn't on the table. Loading a page of 20 aud

Jul 6 · 8 min read · blog.acel.dev  
Read the article

-   [#django](https://hashnode.com/tag/django)
-   [#python](https://hashnode.com/tag/python)
-   [#performance](https://hashnode.com/tag/performance)
-   [#database](https://hashnode.com/tag/database)
-   [#django-rest-framework](https://hashnode.com/tag/django-rest-framework)
-   [#optimization](https://hashnode.com/tag/optimization)

## Written by

[Chukwuemeka Aladimma](https://hashnode.com/@Acel)

@Acel

  
[View profile](https://hashnode.com/@Acel)

Backend Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
