I have two databases on Microsoft SQL Server 2012, both have about 5 million rows. There are not at all the same schema, but they are on the same database on the same server. This query:
Returns 5,717,342 records and takes 5 seconds
But this query:
Returns 5,160,207 records and takes 1.5 minutes.
I am not a DBA, but since there are no joins (and thus I don't think indexes are an issue), I am lost on how something could be THAT much faster/slower, and I'm not sure where to look next.