• About TC
  • Affiliate Disclaimer
  • Privacy Policy
  • TOS
  • Contact
Sunday, June 15, 2025
Techcratic
  • TC
  • AI
    Artificial Intelligence

    Amazon Nova Lite enables Bito to offer a free tier option for its AI-powered code reviews

    Artificial Intelligence

    Bridging the Gap: New Datasets Push Recommender Research Toward Real-World Scale

    Artificial Intelligence

    7 Python Errors That Are Actually Features

    Artificial Intelligence

    10 Awesome OCR Models for 2025

    Artificial Intelligence

    5 Error Handling Patterns in Python (Beyond Try-Except)

    Artificial Intelligence

    Top 5 Alternative Data Career Paths and How to Learn Them for Free

    Artificial Intelligence

    Implementing Machine Learning Pipelines with Apache Spark

    Artificial Intelligence

    Learn Power BI for Free This Week

    Artificial Intelligence

    Build GraphRAG applications using Amazon Bedrock Knowledge Bases

  • Crypto
    Bitcoin Holding $105K During War Is Bullish for Crypto

    Bitcoin Holding $105K During War Is Bullish for Crypto

    Saylor Signals Another Bitcoin Buy—Orange Dots Strike Again

    Saylor Signals Another Bitcoin Buy—Orange Dots Strike Again

    XRP Technical Analysis: Downtrend Dominates—Is the $2.05 Floor About to Collapse?

    XRP Technical Analysis: Downtrend Dominates—Is the $2.05 Floor About to Collapse?

    Best Presales to Buy Today – Which Coins Are Poised for a Breakout?

    Last 72 Hours to Join $49M Raise

    Corporate Bitcoin Holdings a ‘Blessing’ Now, Challenge Later, Says Roxom CEO

    Corporate Bitcoin Holdings a ‘Blessing’ Now, Challenge Later, Says Roxom CEO

    Cryptocurrency Remittances Spike 40% in Latin America

    Cryptocurrency Remittances Spike 40% in Latin America

    Sonic Integrates Bubblemaps V2 to Enhance Onchain Intelligence

    Sonic Integrates Bubblemaps V2 to Enhance Onchain Intelligence

    UBS Sees Senate Rushing ‘One Big, Beautiful Bill’ Toward High-Stakes Finale

    UBS Sees Senate Rushing ‘One Big, Beautiful Bill’ Toward High-Stakes Finale

    Ripple and SEC Seek to End XRP Dispute—Lawyer Sees 70% Chance Judge Will Approve Request

    Ripple and SEC Seek to End XRP Dispute—Lawyer Sees 70% Chance Judge Will Approve Request

  • Cybersecurity
    Cybersecurity

    AI Agents Run on Secret Accounts — Learn How to Secure Them in This Webinar

    Cybersecurity

    How to Address the Expanding Security Risk

    Cybersecurity

    ConnectWise to Rotate ScreenConnect Code Signing Certificates Due to Security Risks

    Cybersecurity

    5 Lessons from River Island

    Cybersecurity

    INTERPOL Dismantles 20,000+ Malicious IPs Linked to 69 Malware Variants in Operation Secure

    Cybersecurity

    SinoTrack GPS Devices Vulnerable to Remote Vehicle Control via Default Passwords

    Cybersecurity

    Researchers Uncover 20+ Configuration Risks, Including Five CVEs, in Salesforce Industry Cloud

    Cybersecurity

    Adobe Releases Patch Fixing 254 Vulnerabilities, Closing High-Severity Security Gaps

    Cybersecurity

    Researcher Found Flaw to Discover Phone Numbers Linked to Any Google Account

  • Deals
    Hitachi FIJ0038 Fuel Injector

    Hitachi FIJ0038 Fuel Injector

    EVGA Supernova 1300 P+, 80+ Platinum 1300W, Fully Modular, 10 Year Warranty, Includes…

    EVGA Supernova 1300 P+, 80+ Platinum 1300W, Fully Modular, 10 Year Warranty, Includes…

    Logitech G502 X Plus Wireless Gaming Mouse – LIGHTSPEED Optical, LIGHTFORCE Switches,…

    Logitech G502 X Plus Wireless Gaming Mouse – LIGHTSPEED Optical, LIGHTFORCE Switches,…

    Cable Matters 8-Pack Snagless Cat 5e Ethernet Cable – 5ft, Gigabit Cat5e Cable, Cat5e…

    Cable Matters 8-Pack Snagless Cat 5e Ethernet Cable – 5ft, Gigabit Cat5e Cable, Cat5e…

    Logitech iPad Pro 12.9 inch Keyboard Case | SLIM COMBO with Detachable, Backlit,…

    Logitech iPad Pro 12.9 inch Keyboard Case | SLIM COMBO with Detachable, Backlit,…

    TECKNET Ergonomic Mouse, Wireless Bluetooth Vertical Mouse, 4800 DPI Optical Tracking, 6…

    TECKNET Ergonomic Mouse, Wireless Bluetooth Vertical Mouse, 4800 DPI Optical Tracking, 6…

    DUMOS Ergonomic Gaming Desk Chair – PU Leather Recliner with Footrest, Lumbar Support,…

    DUMOS Ergonomic Gaming Desk Chair – PU Leather Recliner with Footrest, Lumbar Support,…

    Far Cry 3 (Renewed)

    Far Cry 3 (Renewed)

    Super Smash Bros. Brawl (Renewed)

    Super Smash Bros. Brawl (Renewed)

  • Gaming
    Legend of Zelda Breath of the Wild Gameplay/Walkthrough – Part 3

    Legend of Zelda Breath of the Wild Gameplay/Walkthrough – Part 3

    I'm done with Transformers Reactivate

    I'm done with Transformers Reactivate

    Amazon taps Star Trek Beyond and Mindhunter writer to helm Mass Effect show

    Amazon taps Star Trek Beyond and Mindhunter writer to helm Mass Effect show

    The Last of Us Remastered Honest Review

    The Last of Us Remastered Honest Review

    Stray Review – Quick Review

    Stray Review – Quick Review

    I was surprised and delighted to learn that every FromSoft protagonist outside of Elden Ring Nightreign is 5 feet 7 inches tall, aka the best height for cool people

    I was surprised and delighted to learn that every FromSoft protagonist outside of Elden Ring Nightreign is 5 feet 7 inches tall, aka the best height for cool people

    Pokemon Violet Walkthrough Part 17 – Iron Treads, The Quaking Earth Titan

    Pokemon Violet Walkthrough Part 17 – Iron Treads, The Quaking Earth Titan

    100% Shiny ICE Pokemon Locations in Scarlet & Violet

    100% Shiny ICE Pokemon Locations in Scarlet & Violet

    The Legend of Zelda: Ocarina of Time Master Quest Walkthrough (Pt. 59)

    The Legend of Zelda: Ocarina of Time Master Quest Walkthrough (Pt. 59)

  • Tesla
    Car Seat Organizers,Multi-functional Back Seat Protectors, Storage Pouches, and Tray…

    Car Seat Organizers,Multi-functional Back Seat Protectors, Storage Pouches, and Tray…

    AOHI USB C Car Charger, PD 45W&QC 30W 2 Port Type-C Fast Charging Car Charger Lighter…

    AOHI USB C Car Charger, PD 45W&QC 30W 2 Port Type-C Fast Charging Car Charger Lighter…

    Roof Sunshades for Tesla Model 3 2025, Upgraded 3.0 Sunroof Shade Sunshade Roof Sun…

    Roof Sunshades for Tesla Model 3 2025, Upgraded 3.0 Sunroof Shade Sunshade Roof Sun…

    SOOPII for Tesla Phone Mount,Strongest Magnetic Monitor Mount for Tesla 3/Y…

    SOOPII for Tesla Phone Mount,Strongest Magnetic Monitor Mount for Tesla 3/Y…

    A2C Gym Fitness Phone Mount for MagSafe – 17 N52 Strong Magnets Stable and Secure Phone…

    A2C Gym Fitness Phone Mount for MagSafe – 17 N52 Strong Magnets Stable and Secure Phone…

    3PCS All Weather Tesla Model 3 Highland Floor Mats 2024 2025 | Sleek Design,…

    3PCS All Weather Tesla Model 3 Highland Floor Mats 2024 2025 | Sleek Design,…

    Tesla Door Handle Cover Model Y Model 3 2020-2025 Door Handle Protector Model Y Model 3…

    Tesla Door Handle Cover Model Y Model 3 2020-2025 Door Handle Protector Model Y Model 3…

    FH Group Custom Fit Car Seat Covers for 2020-2024 Tesla Model Y Ultraflex Neoprene Water…

    FH Group Custom Fit Car Seat Covers for 2020-2024 Tesla Model Y Ultraflex Neoprene Water…

    2025 Floor Mats for Tesla Model 3 Highland 2024 Accessories 3PCS TPE All-Weather Foot…

    2025 Floor Mats for Tesla Model 3 Highland 2024 Accessories 3PCS TPE All-Weather Foot…

  • UFO
    New Balance Men’s 574 Greens V2 Golf Shoe

    New Balance Men’s 574 Greens V2 Golf Shoe

    Armin van Buuren rocking Ultra Miami with the new Exploration Of Space (Third Contact Remix)

    Armin van Buuren rocking Ultra Miami with the new Exploration Of Space (Third Contact Remix)

    I found footage of me explaining all 7 Paranormal Activity movies while haunted

    I found footage of me explaining all 7 Paranormal Activity movies while haunted

    Retro Aviator Sunglasses for Women Men – 70s Trendy Square Vintage Shade Sun Glasses UV Protection

    Retro Aviator Sunglasses for Women Men – 70s Trendy Square Vintage Shade Sun Glasses UV Protection

    Pop Culture Conspiracy Theories! Stanley Cups, Love Is Blind, and Dune

    Pop Culture Conspiracy Theories! Stanley Cups, Love Is Blind, and Dune

    Pocket Squares Handkerchiefs for Men Soft Cotton Mens Womens White Pocket Square with Holder for Suit Wedding Business

    Pocket Squares Handkerchiefs for Men Soft Cotton Mens Womens White Pocket Square with Holder for Suit Wedding Business

    unidentified flying object #shorts #ufo #jetplane

    unidentified flying object #shorts #ufo #jetplane

    LIVE: Blue Origin launches Katy Perry, Gayle King to space

    LIVE: Blue Origin launches Katy Perry, Gayle King to space

    Men’s Short Sleeve T-Shirt UPF 50+ Quick Dry Rash Guard Athletic Running T Shirts UV Sun Protection Swim Water Shirt

    Men’s Short Sleeve T-Shirt UPF 50+ Quick Dry Rash Guard Athletic Running T Shirts UV Sun Protection Swim Water Shirt

No Result
View All Result
  • TC
  • AI
    Artificial Intelligence

    Amazon Nova Lite enables Bito to offer a free tier option for its AI-powered code reviews

    Artificial Intelligence

    Bridging the Gap: New Datasets Push Recommender Research Toward Real-World Scale

    Artificial Intelligence

    7 Python Errors That Are Actually Features

    Artificial Intelligence

    10 Awesome OCR Models for 2025

    Artificial Intelligence

    5 Error Handling Patterns in Python (Beyond Try-Except)

    Artificial Intelligence

    Top 5 Alternative Data Career Paths and How to Learn Them for Free

    Artificial Intelligence

    Implementing Machine Learning Pipelines with Apache Spark

    Artificial Intelligence

    Learn Power BI for Free This Week

    Artificial Intelligence

    Build GraphRAG applications using Amazon Bedrock Knowledge Bases

  • Crypto
    Bitcoin Holding $105K During War Is Bullish for Crypto

    Bitcoin Holding $105K During War Is Bullish for Crypto

    Saylor Signals Another Bitcoin Buy—Orange Dots Strike Again

    Saylor Signals Another Bitcoin Buy—Orange Dots Strike Again

    XRP Technical Analysis: Downtrend Dominates—Is the $2.05 Floor About to Collapse?

    XRP Technical Analysis: Downtrend Dominates—Is the $2.05 Floor About to Collapse?

    Best Presales to Buy Today – Which Coins Are Poised for a Breakout?

    Last 72 Hours to Join $49M Raise

    Corporate Bitcoin Holdings a ‘Blessing’ Now, Challenge Later, Says Roxom CEO

    Corporate Bitcoin Holdings a ‘Blessing’ Now, Challenge Later, Says Roxom CEO

    Cryptocurrency Remittances Spike 40% in Latin America

    Cryptocurrency Remittances Spike 40% in Latin America

    Sonic Integrates Bubblemaps V2 to Enhance Onchain Intelligence

    Sonic Integrates Bubblemaps V2 to Enhance Onchain Intelligence

    UBS Sees Senate Rushing ‘One Big, Beautiful Bill’ Toward High-Stakes Finale

    UBS Sees Senate Rushing ‘One Big, Beautiful Bill’ Toward High-Stakes Finale

    Ripple and SEC Seek to End XRP Dispute—Lawyer Sees 70% Chance Judge Will Approve Request

    Ripple and SEC Seek to End XRP Dispute—Lawyer Sees 70% Chance Judge Will Approve Request

  • Cybersecurity
    Cybersecurity

    AI Agents Run on Secret Accounts — Learn How to Secure Them in This Webinar

    Cybersecurity

    How to Address the Expanding Security Risk

    Cybersecurity

    ConnectWise to Rotate ScreenConnect Code Signing Certificates Due to Security Risks

    Cybersecurity

    5 Lessons from River Island

    Cybersecurity

    INTERPOL Dismantles 20,000+ Malicious IPs Linked to 69 Malware Variants in Operation Secure

    Cybersecurity

    SinoTrack GPS Devices Vulnerable to Remote Vehicle Control via Default Passwords

    Cybersecurity

    Researchers Uncover 20+ Configuration Risks, Including Five CVEs, in Salesforce Industry Cloud

    Cybersecurity

    Adobe Releases Patch Fixing 254 Vulnerabilities, Closing High-Severity Security Gaps

    Cybersecurity

    Researcher Found Flaw to Discover Phone Numbers Linked to Any Google Account

  • Deals
    Hitachi FIJ0038 Fuel Injector

    Hitachi FIJ0038 Fuel Injector

    EVGA Supernova 1300 P+, 80+ Platinum 1300W, Fully Modular, 10 Year Warranty, Includes…

    EVGA Supernova 1300 P+, 80+ Platinum 1300W, Fully Modular, 10 Year Warranty, Includes…

    Logitech G502 X Plus Wireless Gaming Mouse – LIGHTSPEED Optical, LIGHTFORCE Switches,…

    Logitech G502 X Plus Wireless Gaming Mouse – LIGHTSPEED Optical, LIGHTFORCE Switches,…

    Cable Matters 8-Pack Snagless Cat 5e Ethernet Cable – 5ft, Gigabit Cat5e Cable, Cat5e…

    Cable Matters 8-Pack Snagless Cat 5e Ethernet Cable – 5ft, Gigabit Cat5e Cable, Cat5e…

    Logitech iPad Pro 12.9 inch Keyboard Case | SLIM COMBO with Detachable, Backlit,…

    Logitech iPad Pro 12.9 inch Keyboard Case | SLIM COMBO with Detachable, Backlit,…

    TECKNET Ergonomic Mouse, Wireless Bluetooth Vertical Mouse, 4800 DPI Optical Tracking, 6…

    TECKNET Ergonomic Mouse, Wireless Bluetooth Vertical Mouse, 4800 DPI Optical Tracking, 6…

    DUMOS Ergonomic Gaming Desk Chair – PU Leather Recliner with Footrest, Lumbar Support,…

    DUMOS Ergonomic Gaming Desk Chair – PU Leather Recliner with Footrest, Lumbar Support,…

    Far Cry 3 (Renewed)

    Far Cry 3 (Renewed)

    Super Smash Bros. Brawl (Renewed)

    Super Smash Bros. Brawl (Renewed)

  • Gaming
    Legend of Zelda Breath of the Wild Gameplay/Walkthrough – Part 3

    Legend of Zelda Breath of the Wild Gameplay/Walkthrough – Part 3

    I'm done with Transformers Reactivate

    I'm done with Transformers Reactivate

    Amazon taps Star Trek Beyond and Mindhunter writer to helm Mass Effect show

    Amazon taps Star Trek Beyond and Mindhunter writer to helm Mass Effect show

    The Last of Us Remastered Honest Review

    The Last of Us Remastered Honest Review

    Stray Review – Quick Review

    Stray Review – Quick Review

    I was surprised and delighted to learn that every FromSoft protagonist outside of Elden Ring Nightreign is 5 feet 7 inches tall, aka the best height for cool people

    I was surprised and delighted to learn that every FromSoft protagonist outside of Elden Ring Nightreign is 5 feet 7 inches tall, aka the best height for cool people

    Pokemon Violet Walkthrough Part 17 – Iron Treads, The Quaking Earth Titan

    Pokemon Violet Walkthrough Part 17 – Iron Treads, The Quaking Earth Titan

    100% Shiny ICE Pokemon Locations in Scarlet & Violet

    100% Shiny ICE Pokemon Locations in Scarlet & Violet

    The Legend of Zelda: Ocarina of Time Master Quest Walkthrough (Pt. 59)

    The Legend of Zelda: Ocarina of Time Master Quest Walkthrough (Pt. 59)

  • Tesla
    Car Seat Organizers,Multi-functional Back Seat Protectors, Storage Pouches, and Tray…

    Car Seat Organizers,Multi-functional Back Seat Protectors, Storage Pouches, and Tray…

    AOHI USB C Car Charger, PD 45W&QC 30W 2 Port Type-C Fast Charging Car Charger Lighter…

    AOHI USB C Car Charger, PD 45W&QC 30W 2 Port Type-C Fast Charging Car Charger Lighter…

    Roof Sunshades for Tesla Model 3 2025, Upgraded 3.0 Sunroof Shade Sunshade Roof Sun…

    Roof Sunshades for Tesla Model 3 2025, Upgraded 3.0 Sunroof Shade Sunshade Roof Sun…

    SOOPII for Tesla Phone Mount,Strongest Magnetic Monitor Mount for Tesla 3/Y…

    SOOPII for Tesla Phone Mount,Strongest Magnetic Monitor Mount for Tesla 3/Y…

    A2C Gym Fitness Phone Mount for MagSafe – 17 N52 Strong Magnets Stable and Secure Phone…

    A2C Gym Fitness Phone Mount for MagSafe – 17 N52 Strong Magnets Stable and Secure Phone…

    3PCS All Weather Tesla Model 3 Highland Floor Mats 2024 2025 | Sleek Design,…

    3PCS All Weather Tesla Model 3 Highland Floor Mats 2024 2025 | Sleek Design,…

    Tesla Door Handle Cover Model Y Model 3 2020-2025 Door Handle Protector Model Y Model 3…

    Tesla Door Handle Cover Model Y Model 3 2020-2025 Door Handle Protector Model Y Model 3…

    FH Group Custom Fit Car Seat Covers for 2020-2024 Tesla Model Y Ultraflex Neoprene Water…

    FH Group Custom Fit Car Seat Covers for 2020-2024 Tesla Model Y Ultraflex Neoprene Water…

    2025 Floor Mats for Tesla Model 3 Highland 2024 Accessories 3PCS TPE All-Weather Foot…

    2025 Floor Mats for Tesla Model 3 Highland 2024 Accessories 3PCS TPE All-Weather Foot…

  • UFO
    New Balance Men’s 574 Greens V2 Golf Shoe

    New Balance Men’s 574 Greens V2 Golf Shoe

    Armin van Buuren rocking Ultra Miami with the new Exploration Of Space (Third Contact Remix)

    Armin van Buuren rocking Ultra Miami with the new Exploration Of Space (Third Contact Remix)

    I found footage of me explaining all 7 Paranormal Activity movies while haunted

    I found footage of me explaining all 7 Paranormal Activity movies while haunted

    Retro Aviator Sunglasses for Women Men – 70s Trendy Square Vintage Shade Sun Glasses UV Protection

    Retro Aviator Sunglasses for Women Men – 70s Trendy Square Vintage Shade Sun Glasses UV Protection

    Pop Culture Conspiracy Theories! Stanley Cups, Love Is Blind, and Dune

    Pop Culture Conspiracy Theories! Stanley Cups, Love Is Blind, and Dune

    Pocket Squares Handkerchiefs for Men Soft Cotton Mens Womens White Pocket Square with Holder for Suit Wedding Business

    Pocket Squares Handkerchiefs for Men Soft Cotton Mens Womens White Pocket Square with Holder for Suit Wedding Business

    unidentified flying object #shorts #ufo #jetplane

    unidentified flying object #shorts #ufo #jetplane

    LIVE: Blue Origin launches Katy Perry, Gayle King to space

    LIVE: Blue Origin launches Katy Perry, Gayle King to space

    Men’s Short Sleeve T-Shirt UPF 50+ Quick Dry Rash Guard Athletic Running T Shirts UV Sun Protection Swim Water Shirt

    Men’s Short Sleeve T-Shirt UPF 50+ Quick Dry Rash Guard Athletic Running T Shirts UV Sun Protection Swim Water Shirt

No Result
View All Result
Techcratic
No Result
View All Result
Home Hacker News

Speed Up Performance with These Tips

Hacker News by Hacker News
April 8, 2025
in Hacker News
Reading Time: 9 mins read
122 8
A A
0

2025-04-08 20:00:00
blog.vectorchord.ai

You might have come across discussions or blog posts suggesting that PostgreSQL’s built-in full-text search (FTS) struggles with performance compared to dedicated search engines or specialized extensions. A notable recent example comes from Neon’s blog post, “Performance Benchmark: pg_search on Neon” (link).

In their benchmark, Neon compared query performance on their database platform with their pg_search extension (based on Rust’s Tantivy library via pgrx) against the Postgres built-in fulltext search setting with tsvector and GIN index. They commendably stated they optimized this standard setup by adding GIN indexes where appropriate (benchmark code available here).

However, while adding GIN indexes is a necessary first step, their results showing significantly slower performance for the “standard” setup suggest crucial additional optimization steps for PostgreSQL FTS were likely missed. The conclusion that standard FTS is inherently much slower than pg_search might be based on an unintentionally handicapped baseline.

Let’s dive into how to correctly set up and use standard PostgreSQL FTS for optimal performance, addressing the specific configuration flaws likely present in the baseline used in the Neon benchmark, and demonstrating the true speed of built-in FTS. We’ll show concrete numbers demonstrating a ~50x performance increase just by applying these standard optimizations to the baseline configuration.

The Benchmark Setup (Recap from Neon’s Analysis)

The analysis used a table structure similar to this with 10 million log entries:

CREATE TABLE benchmark_logs (
    id SERIAL PRIMARY KEY,
    message TEXT,
    country VARCHAR(255),
    severity INTEGER,
    timestamp TIMESTAMP,
    metadata JSONB
);

They tested various query types. Many involved searching the message text field, using queries structured like this in their “standard Postgres” examples:


SELECT country, COUNT(*)
FROM benchmark_logs
WHERE to_tsvector('english', message) @@ to_tsquery('english', 'research')
GROUP BY country
ORDER BY country;

Even with a GIN index present on message, this query structure and the likely default GIN index settings are where the performance issues for the standard FTS baseline begin.

Our Test Environment Details (Replicating the Baseline Scenario)

To demonstrate the impact of proper optimization on standard FTS, we used the following setup:

  • Instance: AWS EC2 i7ie.xlarge with local NVMe SSD (minimizing I/O impact).

  • CPU: 4 vCPUs.

  • PostgreSQL Configuration: PostgreSQL 16 via Docker, configured for the hardware:

      docker run -d \
        --name my-postgres \
        --network=host \
        -v /mnt/localssd/pgdata:/var/lib/postgresql/data \
        -e POSTGRES_PASSWORD=mysecretpassword \
        postgres:latest \
        -c shared_buffers=8GB \
        -c maintenance_work_mem=8GB \
        -c max_parallel_workers=4 \
        -c max_worker_processes=4
    
  • Parallelism Note: This setup provides max_parallel_workers_per_gather = 2. The Neon post mentioned their test environment used 8 parallel workers due to larger instances, implying potentially higher parallelism (max_parallel_workers_per_gather up to 8) than our setup. Our optimized results for standard FTS were achieved with less query parallelism.

Mistake #1: Calculating tsvector On-the-Fly (Major issue)

The sample queries shown in the Neon blog (and common in basic FTS examples) calculate the tsvector within the WHERE clause:

WHERE to_tsvector('english', message) @@ to_tsquery('english', 'research')

This forces PostgreSQL to:

  1. Perform Expensive Computation: Run to_tsvector() (parsing, stemming, etc.) repeatedly for many rows during query execution.

  2. Limit Index Efficiency: Prevent the most direct and efficient use of the GIN index, even if one exists on the base message column.

The Fix (For a Proper Standard FTS Baseline): Pre-calculate and store the tsvector.

  1. Add a tsvector column:

     ALTER TABLE benchmark_logs ADD COLUMN message_tsvector tsvector;
    
  2. Populate the column:

     UPDATE benchmark_logs SET message_tsvector = to_tsvector('english', message);
    
  3. Index the tsvector column (with fastupdate=off): (As shown in Fix #1)

  4. Rewrite queries:

     
     SELECT country, COUNT(*)
     FROM benchmark_logs
     WHERE message_tsvector @@ to_tsquery('english', 'research') 
     GROUP BY country
     ORDER BY country;
    

Mistake #2 : Ignoring GIN Index fastupdate (Minor issue)

While Neon’s benchmark correctly identified GIN as the index type for standard FTS, it likely used the default setting: fastupdate=on.

  • fastupdate=on (Default): Prioritizes index update speed by using pending lists. This significantly slows down searches over time, especially on large, static datasets used for benchmarks, as both the main index and growing pending lists must be scanned. It also contributes to index bloat and less efficient page structure.

  • fastupdate=off: Prioritizes search speed. Index updates are slower, but the resulting index is more compact and significantly faster to query as there are no pending lists to scan. Essential for read-heavy workloads or benchmarking search performance.

For a fair comparison focused on search speed, the standard FTS baseline should have used fastupdate=off.

The Fix (For a Proper Standard FTS Baseline):


CREATE INDEX idx_gin_logs_message_tsvector
ON benchmark_logs USING GIN (message_tsvector) 
WITH (fastupdate = off);

The Performance Impact: A ~50x Speedup for Standard FTS

What happens when we apply these standard optimizations to the standard PostgreSQL FTS setup? We tested a query in Neon’s examples on the 10-million-row dataset:

This demonstrates a ~50x speed improvement for standard PostgreSQL FTS achieved simply by applying well-established best practices. This transforms the baseline performance dramatically, suggesting the comparison point used in the Neon benchmark may not have represented the true potential of built-in FTS. This speedup was achieved even with potentially less query parallelism available than in Neon’s tests.

The Grain of Truth: Ranking (ts_rank) Performance

Neon’s analysis did likely highlight a valid point regarding ranking speed. Functions like ts_rank or ts_rank_cd can be relatively slow in standard PostgreSQL compared to just finding matches. This is because ranking requires fetching and processing data for all matching rows before limiting, which can be I/O and CPU intensive.

Beyond Standard FTS: Advanced Ranking with VectorChord-BM25

While standard FTS excels at finding matches quickly, if sophisticated, high-performance ranking is critical, specialized tools are often required. Instead of relying solely on built-in functions, consider VectorChord-BM25.

VectorChord-BM25 is a PostgreSQL extension specifically designed for fast, relevance-based ranking using the well-regarded BM25 algorithm. BM25 goes beyond simple term matching, estimating relevance based on term frequency within a document and inverse document frequency across the entire collection.

Benchmark against ElasticSearch

Key advantages reported for VectorChord-BM25 include:

  • High Performance: Designed for speed, reportedly outperforming other solutions like Elasticsearch (up to 3x faster) and potentially pg_search for ranking tasks.

  • BM25 Algorithm: Implements a standard, effective relevance ranking model.

  • Specialized Indexing: Uses a dedicated bm25 index type (leveraging optimizations like Block WeakAnd) which is crucial for both performance and calculating the global statistics needed for BM25 scoring.

  • Dedicated Data Type: Introduces a bm25vector type to store tokenized representations suitable for BM25.

If your application heavily relies on the quality and speed of relevance ranking, and standard ts_rank proves insufficient, VectorChord-BM25 presents a powerful, integrated alternative within PostgreSQL.

Conclusion: Standard FTS is Faster Than You Might Think

Standard PostgreSQL FTS is a highly capable and performant feature for finding documents when correctly optimized using tsvector columns and properly configured GIN indexes (with fastupdate=off for reads). Benchmarks suggesting otherwise may be comparing against unoptimized baselines.

For advanced relevance ranking where standard ts_rank falls short, specialized extensions like VectorChord-BM25 offer significant performance improvements by implementing algorithms like BM25 with dedicated data types and optimized indexing strategies.

Choose the right tool for the job: optimize standard FTS first, and if high-performance relevance ranking is paramount, explore dedicated extensions built for that purpose.

Source Link


Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.

Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!


Start your free Amazon Prime trial
today and unlock unlimited streaming and more!

Help Power Techcratic’s Future – Scan To Support

If Techcratic’s content and insights have helped you, consider giving back by supporting the platform with crypto. Every contribution makes a difference, whether it’s for high-quality content, server maintenance, or future updates. Techcratic is constantly evolving, and your support helps drive that progress.

As a solo operator who wears all the hats, creating content, managing the tech, and running the site, your support allows me to stay focused on delivering valuable resources. Your support keeps everything running smoothly and enables me to continue creating the content you love. I’m deeply grateful for your support, it truly means the world to me! Thank you!

BITCOIN

Bitcoin Logo

Bitcoin QR Code

bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge

Scan the QR code with your crypto wallet app

DOGECOIN

Dogecoin Logo

Dogecoin QR Code

D64GwvvYQxFXYyan3oQCrmWfidf6T3JpBA

Scan the QR code with your crypto wallet app

ETHEREUM

Ethereum Logo

Ethereum QR Code

0xe9BC980DF3d985730dA827996B43E4A62CCBAA7a

Scan the QR code with your crypto wallet app

Please read the Privacy and Security Disclaimer on how Techcratic handles your support.

Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.

Tags: Hacker News
Previous Post

Moscow Releases Tax Calculator for Russian Crypto Miners

Next Post

Machinima Interactive Film Festival

Hacker News

Hacker News

Stay updated with Hacker News, where technology meets entrepreneurial spirit. Get the latest on tech trends, startup news, and discussions from the tech community. Read the latest updates here at Techcratic.

Related Posts

Biofuels Policy, a Mainstay of American Agriculture, Has Been a Failure for the Climate, a New Report Claims
Hacker News

Biofuels Policy, a Mainstay of American Agriculture, Has Been a Failure for the Climate, a New Report Claims

June 15, 2025
1.3k
SakanaAI/text-to-lora: Hypernetworks that adapt LLMs for specific benchmark tasks using only textual task description as the input
Hacker News

SakanaAI/text-to-lora: Hypernetworks that adapt LLMs for specific benchmark tasks using only textual task description as the input

June 15, 2025
1.3k
tanelp/tiny-diffusion: A minimal PyTorch implementation of probabilistic diffusion models for 2D datasets.
Hacker News

tanelp/tiny-diffusion: A minimal PyTorch implementation of probabilistic diffusion models for 2D datasets.

June 15, 2025
1.3k
How we investigated Amsterdam’s attempt to build a ‘fair’ fraud detection model
Hacker News

How we investigated Amsterdam’s attempt to build a ‘fair’ fraud detection model

June 14, 2025
1.3k
Waymo rides cost more than Uber or Lyft — and people are paying anyway
Hacker News

Waymo rides cost more than Uber or Lyft — and people are paying anyway

June 14, 2025
1.3k
GitHub – zachlatta/sshtron: $ ssh sshtron.zachlatta.com
Hacker News

GitHub – zachlatta/sshtron: $ ssh sshtron.zachlatta.com

June 14, 2025
1.3k
yousef-rafat/miniDiffusion: A reimplementation of Stable Diffusion 3.5 in pure PyTorch
Hacker News

yousef-rafat/miniDiffusion: A reimplementation of Stable Diffusion 3.5 in pure PyTorch

June 14, 2025
1.3k
TimeGuessr
Hacker News

TimeGuessr

June 14, 2025
1.3k
Load More
Next Post
Machinima Interactive Film Festival

Machinima Interactive Film Festival

Smartphone

Infinix GT 30 Pro spotted on Geekbench

Portnox raises $37.5 million to scale cloud-native zero trust access control

Portnox raises $37.5 million to scale cloud-native zero trust access control

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Your Tech Resources

  • 30 Second Tech ™
  • AI
  • App Zone ™
  • Apple
  • Ars Technica
  • CNET
  • ComputerWorld
  • Crypto News
  • Cybersecurity
  • Endgadget
  • Fossbytes
  • Gaming
  • GeekWire
  • Gizmodo
  • Google News
  • Hacker News
  • Harvard Tech
  • I Like Cats ™
  • I Like Dogs ™
  • LifeHacker
  • MacRumors
  • Macworld
  • Mashable
  • Microsoft
  • MIT Tech
  • PC World
  • Photofocus
  • Physics
  • Random Tech
  • Retro Rewind ™
  • Robot Report
  • SiliconANGLE
  • SlashGear
  • Smartphone
  • StackSocial
  • Tech Art
  • Tech Careers
  • Tech Deals
  • Techcratic ™
  • TechCrunch
  • Techdirt
  • TechRepublic
  • Techs Got To Eat ™
  • TechSpot
  • Tesla
  • The Verge
  • TNW
  • Trusted Reviews
  • UFO
  • VentureBeat
  • Visual Capitalist
  • Wired
  • ZDNet

Tech News

  • 30 Second Tech ™
  • AI
  • Apple Insider
  • Ars Technica
  • CNET
  • ComputerWorld
  • Crypto News
  • Cybersecurity
  • Endgadget
  • ExtremeTech
  • Fossbytes
  • Gaming
  • GeekWire
  • Gizmodo

Tech News

  • Harvard Tech
  • MacRumors
  • Macworld
  • Mashable
  • Microsoft
  • MIT Tech
  • Physics
  • PC World
  • Random Tech
  • Retro Rewind ™
  • SiliconANGLE
  • SlashGear
  • Smartphone
  • StackSocial
  • Tech Careers

Tech News​

  • Tech Art
  • TechCrunch
  • Techdirt
  • TechRepublic
  • Techs Got To Eat ™
  • TechSpot
  • Tesla
  • The Verge
  • TNW
  • Trusted Reviews
  • UFO
  • VentureBeat
  • Visual Capitalist
  • Wired
  • ZDNet

Site Links

  • About Techcratic
  • Affiliate Disclaimer
  • Affiliate Link Policy
  • Contact Techcratic
  • Dealors Discount Store
  • Privacy and Security Disclaimer
  • Privacy Policy
  • RSS Feed
  • Site Map
  • Support Techcratic
  • Techcratic
  • Tech Deals
  • TOS
  • 𝕏
Click For A Secret Deal

Techcratic – Your All In One Tech Hub © 2020 – 2025
All Rights Reserved
∞

No Result
View All Result
  • 30 Second Tech ™
  • AI
  • App Zone ™
  • Apple
  • Ars Technica
  • CNET
  • Crypto News
  • Cybersecurity
  • Endgadget
  • Gaming
  • I Like Cats ™
  • I Like Dogs ™
  • MacRumors
  • Macworld
  • Tech Deals
  • Techcratic ™
  • Techs Got To Eat ™
  • Tesla
  • UFO
  • Wired