Follow

feeding my datasheet search engine database its favourite treat, a whole CPU core

· · Web · 2 · 0 · 4

well crap, it knocked over the container and now I've lost three whole CPU cores...

So apparently removing the DISTINCT cuts the query time in half, but it's still very slow...

With DISTINCT: explain.depesz.com/s/cOeV
Without DISTINCT: explain.depesz.com/s/QAIM5

Where on earth is this remaining sort operation coming from??

Aha, forgot that UNION also does a uniqueness check. Changing it to UNION ALL fixed that.

@kim I already gave it so many cores though :( I was having load averages of 40+!

Sign in to participate in the conversation
Pixietown

Small server part of the pixie.town infrastructure. Registration is closed.