Folks,
I am really only starting now to try to access Pervasive tables directly from the web. When I tried this before, performance was so bad that I had to abandon the idea. However, I am back on the track of trying to do this.
The query that I am trying to run at the moment joins three tables - Order Master, Part Master and Job Progress. Sometimes this query runs pretty quickly (few seconds) but other times it can timeout. I don't know if it is my query or something to do with the database.
The main indexes for the tables are:
Order Master: ORDNUM_10 + LINNUM_10 + DELNUM_10
Part Master: PRTNUM_01
Job Progress: ORDNUM_14 + OPRSEQ_14
Bearing that in mind, my query is as follows:
SELECT "Order Master".ORDNUM_10, "Order Master".PRTNUM_10, "Part Master".PMDES1_01, "Job Progress".QTYREM_14 FROM ("Order Master" INNER JOIN "Part Master" ON "Order Master".PRTNUM_10 = "Part Master".PRTNUM_01) INNER JOIN "Job Progress" ON "Order Master".ORDER_10 = "Job Progress".ORDNUM_14 WHERE "Job Progress".OPRSEQ_14 = '0099' AND "Job Progress".QTYREM_14 > 0 AND "Order Master".STATUS_10 NOT IN ('4', '5') AND "Order Master".LINNUM_10 = '00' AND "Order Master".DELNUM_10 = '00' ORDER BY "Order Master".ORDNUM_10
Is that query OK or should I look at a more efficient way of writing it?
Mighty
I am really only starting now to try to access Pervasive tables directly from the web. When I tried this before, performance was so bad that I had to abandon the idea. However, I am back on the track of trying to do this.
The query that I am trying to run at the moment joins three tables - Order Master, Part Master and Job Progress. Sometimes this query runs pretty quickly (few seconds) but other times it can timeout. I don't know if it is my query or something to do with the database.
The main indexes for the tables are:
Order Master: ORDNUM_10 + LINNUM_10 + DELNUM_10
Part Master: PRTNUM_01
Job Progress: ORDNUM_14 + OPRSEQ_14
Bearing that in mind, my query is as follows:
SELECT "Order Master".ORDNUM_10, "Order Master".PRTNUM_10, "Part Master".PMDES1_01, "Job Progress".QTYREM_14 FROM ("Order Master" INNER JOIN "Part Master" ON "Order Master".PRTNUM_10 = "Part Master".PRTNUM_01) INNER JOIN "Job Progress" ON "Order Master".ORDER_10 = "Job Progress".ORDNUM_14 WHERE "Job Progress".OPRSEQ_14 = '0099' AND "Job Progress".QTYREM_14 > 0 AND "Order Master".STATUS_10 NOT IN ('4', '5') AND "Order Master".LINNUM_10 = '00' AND "Order Master".DELNUM_10 = '00' ORDER BY "Order Master".ORDNUM_10
Is that query OK or should I look at a more efficient way of writing it?
Mighty