Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Nested loops are killing throughput



CG <cgg007(at)yahoo(dot)com> writes:
> I'm still getting the nested loop for a join.
 
> Nested Loop  (cost=100000000.00..100013378.98 rows=2206 width=145) (actual time=46.743..18202.318 rows=2225 loops=1)
>   ->  Index Scan using packet_user_idx on packet dp  (cost=0.00..88.03 rows=2206 width=125) (actual time=42.263..124.519 rows=2225 loops=1)
>         Index Cond: ((username)::text = 'joeuser'::text)
>   ->  Index Scan using packet_status_puuid_pkey on packet_status dps  (cost=0.00..6.01 rows=1 width=20) (actual time=8.115..8.117 rows=1 loops=2225)
>         Index Cond: ("outer".packet_uuid = dps.packet_uuid)
> Total runtime: 18205.880 ms

If packet_status is large, that seems like a perfectly reasonable plan
to me.  If not ... what data type is packet_uuid?  Is its equality op
marked mergeable or hashable?

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group