WindmillWWindmill
Powered by
rubenfR
Windmill•12mo ago•
14 replies
rubenf

Can you connect to your postgresql

Can you connect to your postgresql database with psql and show me the result of:
\d v2_job;

Next, can you run:
EXPLAIN ANALYZE SELECT
            schedule.*, t.jobs FROM schedule,
            LATERAL(SELECT ARRAY(
                SELECT json_build_object('id', id, 'success', status = 'success', 'duration_ms', duration_ms)
                FROM v2_job_completed c JOIN v2_job j USING (id)
                WHERE trigger_kind = 'schedule'
                    AND trigger = schedule.path
                    AND c.workspace_id = 'admins'
                    AND j.workspace_id = 'admins'
                    AND parent_job IS NULL AND runnable_path = schedule.script_path
                    AND status <> 'skipped'
                ORDER BY created_at DESC
                LIMIT 20
            ) AS jobs) t
        WHERE workspace_id = 'admins'
        ORDER BY edited_at DESC;
EXPLAIN ANALYZE SELECT
            schedule.*, t.jobs FROM schedule,
            LATERAL(SELECT ARRAY(
                SELECT json_build_object('id', id, 'success', status = 'success', 'duration_ms', duration_ms)
                FROM v2_job_completed c JOIN v2_job j USING (id)
                WHERE trigger_kind = 'schedule'
                    AND trigger = schedule.path
                    AND c.workspace_id = 'admins'
                    AND j.workspace_id = 'admins'
                    AND parent_job IS NULL AND runnable_path = schedule.script_path
                    AND status <> 'skipped'
                ORDER BY created_at DESC
                LIMIT 20
            ) AS jobs) t
        WHERE workspace_id = 'admins'
        ORDER BY edited_at DESC;

Where you have replaced 3 times 'admins' with the name of your workspace in the query above.
WindmillJoin
3,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

Can you share the version you're on and
rubenfRrubenf / general
3y ago
"Native" handler for HTTP and Postgresql
rubenfRrubenf / general
3y ago
can you try on another smaller workspace
rubenfRrubenf / general
2y ago
can you give us a script that return
rubenfRrubenf / general
5d ago