Fwd: explain analyse and nested loop joins - Mailing list pgsql-general

From Oliver Kohll - Mailing Lists
Subject Fwd: explain analyse and nested loop joins
Date
Msg-id CDD73300-3AD0-4D82-B209-67D401D1762C@gtwm.co.uk
Whole thread Raw
In response to explain analyse and nested loop joins  (Oliver Kohll - Mailing Lists <oliver.lists@gtwm.co.uk>)
List pgsql-general
Oops, forgot to include the query, it's

SELECT b2deliveryorders.idb2deliveryorders, a2clientpremises.ida2clientpremises, a2clientpremises.premisesname, a2clientpremises.town, b2deliveryorders.expectedby, b2deliveryorders.dateordered, b2deliveryorders.invoicenumber, b2deliveryorders.deliverymethod, b2deliveryorders.driver, dbvcalc_delivery_charges.total, dbvcalc_delivery_charges.boxes, b2deliveryorders.createdbyauto
   FROM b2deliveryorders
   LEFT JOIN a2clientpremises ON b2deliveryorders.a2clientpremisespremisesname = a2clientpremises.ida2clientpremises
   LEFT JOIN dbvcalc_delivery_charges ON b2deliveryorders.idb2deliveryorders = dbvcalc_delivery_charges.idb2deliveryorders
  WHERE b2deliveryorders.complete = false AND b2deliveryorders.invoiced = false
  ORDER BY b2deliveryorders.expectedby NULLS FIRST;

Oliver

Begin forwarded message:

From: Oliver Kohll - Mailing Lists <oliver.lists@gtwm.co.uk>
Subject: explain analyse and nested loop joins
Date: 5 November 2011 19:21:23 GMT
To: pgsql-general <pgsql-general@postgresql.org>

Hi,

I have a query I'm trying to optimise. 

pgsql-general by date:

Previous
From: Oliver Kohll - Mailing Lists
Date:
Subject: explain analyse and nested loop joins
Next
From: John R Pierce
Date:
Subject: Re: Distinct on a non-sort column