Stephan,
Here is what EXPLAIN shows:
NOTICE: QUERY PLAN:
Sort (cost=0.02..0.02 rows=1 width=64)
-> Nested Loop (cost=0.00..0.01 rows=1 width=64)
-> Seq Scan on tblmedcond (cost=0.00..0.00 rows=1 width=36)
-> Seq Scan on tblsidedruglink (cost=0.00..0.00 rows=1 width=28)
All right ... after reading up on the documentation for vacuum, I
understand why that's necessary. I've run vacuum analyze on all the
tables, now. Here are the more realistic results from explain:
NOTICE: QUERY PLAN:
Sort (cost=62.46..62.46 rows=14 width=64)
-> Nested Loop (cost=0.00..62
The following query:
SELECT
tblSIDEDrugLink.DrugID,
tblSIDEDrugLink.MedCondID,
tblMedCond.PatientName AS MedCondPatientName,
tblMedCond.ProfessionalName AS MedCondProfessionalName,
tblSIDEDrugLink.Frequency,
tblSIDEDrugLink.SeverityLevel
FROM