What if the new query has a significantly lower cost compared to the older
one?
The current query found in pgaJob.cpp:
SELECT *,
(SELECT jlgstatus FROM pgagent.pga_joblog jl WHERE jl.jlgjobid =
j.jobid ORDER BY jlgid DESC LIMIT 1) AS joblastresult
FROM pgagent.pga_job j
Another solution would be to call a function in the database rather than
imbedding the SQL in C++. If you look at pgagent.sql, there are a few
functions created to support jobs. Maybe this could be another function
call so it could easily be modified to support Greenplum and make it easier
for users
6..0.006 rows=0 loops=2)"
"Index Cond: (ag.jagpid = j.jobagentid)"
"-> Index Scan using pga_jobclass_pkey on pga_jobclass cl
(cost=0.00..0.75 rows=1 width=22) (actual time=0.016..0.020 rows=1 loops=2)"
" Index Cond: (cl.jclid
Version: 8.3
Platform: Windows
Installation: Clicked the pl/java checkbox on installation
Postgresql.conf changes
custom_variable_classes = 'pljava'
pljava.classpath='C:\\Program
Files\\PostgreSQL\\8.3\\share\\pljava.jar'
OS Path: I added C:\Program Files\Java\jdk1.6.0_02\jre\bin\client a