pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Miles Keaton <mileskeaton@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Benchmark two separate SELECTs versus one LEFT JOIN
Date: Wed, 5 Jan 2005 18:31:49 -0800
Message-ID: <59b2d39b0501051831643e90f2@mail.gmail.com> (raw)

Has anyone seen a benchmark on the speed difference between:

SELECT * FROM item WHERE id=123;
and
SELECT * FROM vendor WHERE id=515;

versus:

SELECT * FROM item LEFT JOIN vendor ON item.vendor_id=vendor.id WHERE
item.id=123;



I only have a laptop here so I can't really benchmark properly.
I'm hoping maybe someone else has, or just knows which would be faster
under high traffic/quantity.

Thanks!



view thread (2+ messages)  latest in thread

Message-ID: <59b2d39b0501051831643e90f2@mail.gmail.com>
Permalink:  ../59b2d39b0501051831643e90f2@mail.gmail.com/
Also on:    postgresql.org/message-id/59b2d39b0501051831643e90f2@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: mileskeaton@gmail.com
  Subject: Re: Benchmark two separate SELECTs versus one LEFT JOIN
  In-Reply-To: <59b2d39b0501051831643e90f2@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox