Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.163 Beiträge
 
Delphi 12 Athens
 
#2

AW: Postgre Query Performance Problem

  Alt 27. Aug 2012, 15:55
Mit der neueren Joint-Syntax hast du es auch schonmal versucht?
SQL-Code:
SELECT sp.id_catalogpart AS "id", sp.id_station AS "id1", sp.id_location AS "id2", sum(sp.quantity) AS "count"
FROM mtx_stockparts sp
JOIN mtx_catalogparts cp ON sp.id_catalogpart = cp.id
JOIN cd_stations st ON sp.id_station = st.id
WHERE sp._entrytype = 0
  AND st._deletedat IS NULL
  AND sp._deletedat IS NULL
GROUP BY sp.id_catalogpart, sp.id_station, sp.id_location
Ob das so einen Unterschied ausmacht, weiß ich nicht.
SQL-Code:
SELECT sp.id_catalogpart AS "id", sp.id_station AS "id1", sp.id_location AS "id2", sum(sp.quantity) AS "count"
FROM mtx_stockparts sp
JOIN mtx_catalogparts cp ON sp.id_catalogpart = cp.id
JOIN cd_stations st ON st._deletedat IS NULL AND sp.id_station = st.id
WHERE sp._entrytype = 0 AND sp._deletedat IS NULL
GROUP BY sp.id_catalogpart, sp.id_station, sp.id_location
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests

Geändert von himitsu (27. Aug 2012 um 16:00 Uhr)
  Mit Zitat antworten Zitat