Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
656 B
1
Indexable
Never
CREATE OR REPLACE VIEW public.workflow_detail_view
AS
SELECT wv.workflow_id,
    wv.internal_workflow_id,
    wv.engine,
        -- (Rest of your code...)
    COALESCE(((wv.benchmark_config_jsonb -> 'config'::text) ->> 'numberOfReaders'::text)::integer, 0) AS number_of_readers,
    CASE 
        WHEN wv.instance_family = 'serverless'::text THEN GREATEST(wv.instance_size::integer / 16, 1)
        WHEN wv.instance_size ~ '\d'::text THEN regexp_replace(wv.instance_size, '[^\d]'::text, ''::text, 'g'::text)::integer
        ELSE 0 
     END * 4 AS instance_cores
FROM workflow_v2 wv;

ALTER TABLE public.workflow_detail_view
    OWNER TO "AuroraPerfEngg";
Leave a Comment