Skip to main content
14 events
when toggle format what by license comment
Sep 1, 2022 at 3:23 answer added Guy timeline score: 0
Aug 31, 2022 at 21:47 comment added Guy It makes heavy-use of post_id. But creating an index for post_id did not help.
Aug 31, 2022 at 15:35 history edited Guy CC BY-SA 4.0
added 4809 characters in body
Aug 31, 2022 at 14:20 comment added jjanes Whatever else may be going on, the time spent in JIT is unlikely to be worth it.
Aug 31, 2022 at 14:11 comment added jjanes Given how common 'Business' is as a category or subcategory, it should probably be blacklisted as a search term.
Aug 31, 2022 at 14:09 comment added jjanes Your work_mem is too low, as shown both by lossy=39143 and by (I think) the subplan being iterated rather than hashed.
Aug 31, 2022 at 13:56 comment added jjanes Please preserve the indenting of your query plan.
Aug 31, 2022 at 13:32 comment added Guy Thanks, I have revised the query. Will look into EXISTS.
Aug 31, 2022 at 13:28 history edited Guy CC BY-SA 4.0
deleted 218 characters in body
Aug 31, 2022 at 4:33 review Close votes
Sep 17, 2022 at 3:08
Aug 31, 2022 at 4:15 comment added Laurenz Albe The function definition is incomplete, the execution plan is incomplete (the last nested loop join has no second table), and the query you show is not SQL. Please remedy these shortcomings. Anyway, the cause for the long run time is clearly the IN (SELECT ...) clause in the function that has to be evaluated for each of the estimated 8000 rows. Try to rewrite that as a join or an EXISTS clause.
Aug 31, 2022 at 4:09 history edited Laurenz Albe CC BY-SA 4.0
added 23 characters in body
S Aug 31, 2022 at 1:04 review First questions
Aug 31, 2022 at 13:22
S Aug 31, 2022 at 1:04 history asked Guy CC BY-SA 4.0