data-structures

Select hash tables, bloom filters, or sorted arrays for database query operations.

71|8|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/SolidLao/GenDB --skill data-structures-solidlao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-structures
Source: https://github.com/SolidLao/GenDB/tree/main/.claude/skills/data-structures
Command: npx skills add https://github.com/SolidLao/GenDB --skill data-structures-solidlao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a framework for selecting the most efficient data structures for database query operations, optimizing performance by considering factors like data size, key types, and hardware cache.

Core Features & Use Cases

  • Data Structure Selection: Guides the choice between hash tables, bloom filters, sorted arrays, and direct arrays based on specific query needs (joins, aggregations, filtering).
  • Memory Estimation: Provides formulas to estimate memory footprints for different structures, crucial for avoiding cache thrashing.
  • Use Case: When planning a join operation on a large table, this skill helps determine if a hash table will fit in the CPU's cache or if a partitioned approach or bloom filter is more appropriate for performance.

Quick Start

Use the data-structures skill to determine the best data structure for a join operation on a table with 10 million integer keys.

Frequently Asked Questions about data-structures

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between a hash table and a bloom filter for database query optimization?

For database query optimization, choose a hash table for exact lookups, or a bloom filter for space-efficient probabilistic membership testing. This framework guides selection based on specific query needs like joins, aggregations, and filtering.

What is the best way to optimize data structures for joins on large tables?

To optimize data structures for joins on large tables, use this framework to determine if a hash table fits the CPU cache or if a partitioned approach or bloom filter is more appropriate for performance.

How do I estimate memory footprint for hash tables and bloom filters?

You estimate memory footprint using the provided formulas for different data structures. This helps estimate memory footprints for hash tables and bloom filters, which is crucial for avoiding cache thrashing.

When do I need a sorted array versus a direct array for query operations?

You need a sorted array versus a direct array for query operations when optimizing data structure selection based on data characteristics, memory constraints, and lookup costs for specific filtering or aggregation tasks.

Can I use this data structure selection framework for aggregations and filtering?

Yes, you can use this framework for aggregations and filtering. It guides the choice between hash tables, bloom filters, sorted arrays, and direct arrays based on specific query needs and data size.