{
    "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index",
    "locale": "en",
    "title": "B-tree index: Knowledge hub | DeLaParra Services",
    "description": "The default, general-purpose index. Balanced tree that supports equality and range queries and ORDER BY.",
    "alternates": {
        "en": "https://delaparra-services.nl/knowledge-hub/b-tree-index",
        "nl": "https://delaparra-services.nl/nl/kennisbank/b-tree-index"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/knowledge-hub/b-tree-index.csv",
        "md": "https://delaparra-services.nl/knowledge-hub/b-tree-index.md",
        "json": "https://delaparra-services.nl/knowledge-hub/b-tree-index.json",
        "zip": "https://delaparra-services.nl/knowledge-hub/b-tree-index.zip",
        "pdf": "https://delaparra-services.nl/knowledge-hub/b-tree-index.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index.csv",
            "encodingFormat": "text/csv",
            "name": "b-tree-index.csv"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index.json",
            "encodingFormat": "application/json",
            "name": "b-tree-index.json"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index.md",
            "encodingFormat": "text/markdown",
            "name": "b-tree-index.md"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index.pdf",
            "encodingFormat": "application/pdf",
            "name": "b-tree-index.pdf"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index.zip",
            "encodingFormat": "application/zip",
            "name": "b-tree-index.zip"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index/skills.zip",
            "encodingFormat": "application/zip",
            "name": "b-tree-index-skills.zip"
        }
    ],
    "markdown": "1. [Home](<https://delaparra-services.nl/>) \n1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) \n1. [B-tree index](<https://delaparra-services.nl/knowledge-hub/b-tree-index>)\n\n  \n\nCategory: SQL \n\n# B-tree index\n\n  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    \n\n## What is B-tree index?\n\n \n\nB-tree index: The default, general-purpose index. Balanced tree that supports equality and range queries and ORDER BY. A B-tree index is the default index type in most relational databases. It keeps values sorted in a balanced tree, so the database can find a row in a few steps instead of reading the whole table.\n\n \n\nDefinition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)\n\n \n\n## Frequently asked questions about B-tree index\n\n  \n\n### How is B-tree index used in practice?\n\n \n\nIt supports exact matches, ranges and sorting. A query like ` WHERE created_at > '2026-01-01' ORDER BY created_at ` can use a B-tree index on ` created_at ` for both the filter and the order.\n\n    \n\n### What should you keep in mind with B-tree index?\n\n \n\nThe column order in a composite index matters. An index on ` (customer_id, created_at) ` helps queries that filter on ` customer_id `, but not queries that only filter on ` created_at `. Every index also slows down writes a little and uses disk space. Add indexes for the queries you actually run, and use ` EXPLAIN ` to check that the database uses them.\n\n    \n\n### What does an example of B-tree index look like?\n\n \n\n```\nCREATE INDEX idx_orders_created ON orders (created_at);\n```\n\n \n\n## At a glance\n\n   CategorySQL Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026\n\n \n\n## More SQL terms\n\n \n\n- [ACID](<https://delaparra-services.nl/knowledge-hub/acid>) \n- [BEGIN / COMMIT / ROLLBACK](<https://delaparra-services.nl/knowledge-hub/begin-commit-rollback>) \n- [CASE](<https://delaparra-services.nl/knowledge-hub/case>) \n- [COALESCE](<https://delaparra-services.nl/knowledge-hub/coalesce>) \n- [composite index](<https://delaparra-services.nl/knowledge-hub/composite-index>) \n- [COUNT / SUM / AVG / MIN / MAX](<https://delaparra-services.nl/knowledge-hub/count-sum-avg-min-max>)\n\n \n\n[All terms starting with B](<https://delaparra-services.nl/knowledge-hub#letter-b>)\n\n \n\n## Skills\n\n \n\n- ### SQL Performance Optimization Assistant\n\n \n\n'Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Provides execution plan analysis, pagination optimization, batch operations, and performance monitoring guidance.'\n\n [View skill](<https://delaparra-services.nl/skills/sql-optimization>) [Download zip](<https://delaparra-services.nl/skills/sql-optimization/download>) \n- ### SQL Optimization Patterns\n\n \n\nMaster SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.\n\n [View skill](<https://delaparra-services.nl/skills/sql-optimization-patterns>) [Download zip](<https://delaparra-services.nl/skills/sql-optimization-patterns/download>) \n- ### Supabase Postgres Best Practices\n\n \n\nPostgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and schedule\n\n [View skill](<https://delaparra-services.nl/skills/supabase-postgres-best-practices>) [Download zip](<https://delaparra-services.nl/skills/supabase-postgres-best-practices/download>)\n\n [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/b-tree-index/skills.zip>)\n\n \n\n## Manuals\n\n \n\n- [Writing SQL queries and migrations](<https://delaparra-services.nl/manuals/sql-queries-en-migraties>)\n\n \n\n## Related services\n\n \n\n- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)\n\nPerhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet. \n- [AI code review](<https://delaparra-services.nl/services#service-05>)\n\nWhen you push your new change, I will review your code, help your agent avoid the same mistake again, and get your app ready for deployment.\n\n \n\n## Need any help?\n\n \n\nStuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.\n\n  [Get in touch](<https://delaparra-services.nl/availability>)\n\n[HTML version](https://delaparra-services.nl/knowledge-hub/b-tree-index)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "FAQPage",
                "@id": "https://delaparra-services.nl/knowledge-hub/b-tree-index#webpage",
                "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index",
                "name": "B-tree index: Knowledge hub | DeLaParra Services",
                "description": "The default, general-purpose index. Balanced tree that supports equality and range queries and ORDER BY.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@type": "DefinedTerm",
                    "@id": "https://delaparra-services.nl/knowledge-hub/b-tree-index#term",
                    "name": "B-tree index",
                    "description": "The default, general-purpose index. Balanced tree that supports equality and range queries and ORDER BY.",
                    "termCode": "b-tree-index",
                    "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index",
                    "inLanguage": "en",
                    "keywords": "SQL",
                    "dateModified": "2026-11-25T17:46:25+00:00",
                    "inDefinedTermSet": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#terms"
                    },
                    "isPartOf": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#dataset"
                    },
                    "subjectOf": [
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/b-tree-index#webpage"
                        },
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/b-tree-index#dataset"
                        }
                    ]
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/b-tree-index#breadcrumb"
                },
                "mainEntity": [
                    {
                        "@type": "Question",
                        "name": "What is B-tree index?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "The default, general-purpose index. Balanced tree that supports equality and range queries and ORDER BY. A B-tree index is the default index type in most relational databases. It keeps values sorted in a balanced tree, so the database can find a row in a few steps instead of reading the whole table."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "How is B-tree index used in practice?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "It supports exact matches, ranges and sorting. A query like WHERE created_at > '2026-01-01' ORDER BY created_at can use a B-tree index on created_at for both the filter and the order."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What should you keep in mind with B-tree index?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "The column order in a composite index matters. An index on (customer_id, created_at) helps queries that filter on customer_id, but not queries that only filter on created_at. Every index also slows down writes a little and uses disk space. Add indexes for the queries you actually run, and use EXPLAIN to check that the database uses them."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What does an example of B-tree index look like?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "CREATE INDEX idx_orders_created ON orders (created_at);"
                        }
                    }
                ],
                "author": {
                    "@id": "https://delaparra-services.nl/#person"
                },
                "mentions": [
                    {
                        "@id": "https://delaparra-services.nl/skills/sql-optimization#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/sql-optimization-patterns#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/supabase-postgres-best-practices#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/sql-queries-en-migraties#article"
                    }
                ]
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/knowledge-hub/b-tree-index#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Knowledge hub",
                        "item": "https://delaparra-services.nl/knowledge-hub"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": "B-tree index"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/knowledge-hub/b-tree-index#dataset",
                "name": "B-tree index",
                "description": "The default, general-purpose index. Balanced tree that supports equality and range queries and ORDER BY.",
                "url": "https://delaparra-services.nl/knowledge-hub/b-tree-index",
                "identifier": "https://delaparra-services.nl/knowledge-hub/b-tree-index#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/b-tree-index#term"
                },
                "creator": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://creativecommons.org/licenses/by/4.0/",
                "creditText": "Coders Lingo (https://coderslingo.com/resources/open-dataset/), CC BY 4.0",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "keywords": "SQL",
                "version": "2026-11-25",
                "dateModified": "2026-11-25T17:46:25+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#dataset",
                    "name": "IT terms from A to Z",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "b-tree-index.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/b-tree-index.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "b-tree-index.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/b-tree-index.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "b-tree-index.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/b-tree-index.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "b-tree-index.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/b-tree-index.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "b-tree-index.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/b-tree-index.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "b-tree-index-skills.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/b-tree-index/skills.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:25+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    }
                ]
            }
        ]
    }
}