Tag Info

New answers tagged

0

Do you have actually a big difference in running time two different plans? Optimizer just choses cheaper plan based on estimated number of rows for CostType. In case of serial plan it's >5 times bigger. That could be really caused by the fact you've added more records to the CostType table or your stats is stale. As a result, you have table spool which is ...


0

How is it possible different databases are using different query plans? It all depends on the options, statistics, queries, indexes, etc that are setup. I couldn't begin to explain to you. What I would recommend you do is if you know the plan it should use, you can give query hints (usually a bad idea) or you can rewrite your query. First of all, you do ...


1

I find that if I try to write out what my query is doing, it tends to illuminate the answer -- for everything that is in payment -- that doesn't have a refund date and doesn't have a deleted at -- And the payments have a subscription and a user -- give me their subscription id and the count of subscriptions SELECT COUNT(subscription.user_id) as cnt , ...



Top 50 recent answers are included