one query is performed and joined it to a table
Paul Clapham wrote:I would do the two queries and combine them with "UNION" to produce the result you're looking for.
Ricardo Coto wrote:union isn't the path to take, it scan the table twice
Ricardo Coto wrote:a union isn't the path to take
Ricardo Coto wrote:but it's not sql server, is postgres
Ricardo Coto wrote:Actually the time it took is pretty good, it took a lot of time presenting me de results because i'm using the shell of psql
Ricardo Coto wrote:Query you put before, get me empty categories and takes a lot of time
Ricardo Coto wrote:if you notice, below there are some filters in the where clause with the column extracted from the inner queries in the left joins...
Ricardo Coto wrote:Brian:
Adjustment in Funding removing the order by gave one ms of optimization
Adjustment in paid removing last_payment gave me a little bit of time (less tan a ms)
Can't remove the ids you mentioned because they are use to link the joins...
Thanks, i'll go with the next tips...
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Javahttps://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire