Redis. Let’s say you’ve written a site in php; for whatever reason, it becomes popular and it’s ahead of its time or has porno on it. You realize this php is so freaking slow, "I’m gonna lose my fans because they simply won’t wait 10 seconds for a page." You have a sudden realization that a web p...
What could be reasons for getting the error `Invalid object name'#temptable'` immediately after running CREATE TABLE #temptable INSERT INTO #temptable....
I've managed to produce a similar issue, not an invalid table name but invalid column name. However, maybe it's the same thing and the error message just depends on the version?
FWIW, here's my script:
CREATE PROCEDURE dbo.tmptest
AS
CREATE TABLE #test (ID int);
INSERT INTO #test (ID) VALUES (1), (2);
SELECT * FROM #test;
GO
CREATE TABLE #test (Value xml);
EXECUTE dbo.tmptest;
GO
DROP TABLE #test;
GO
DROP PROCEDURE dbo.tmptest;
GO
Basically, the problem in this case happens when a temporary table by the same name exists when the SP is invoked
(by the same name but with a different structure, of course)
Hmm, looks like I was too hasty. Apparently those were compile-time errors
I have a stupid question that I'm sure is too trivial for the site: In "recently expensive queries" on sql-server ssms activity monitor, I've got a query should ~100 executions and >10 million logical reads. does that really mean the db engine has trawled through ~80gb of data for that query?
Do men or women have more brothers?
I think women have more as no man can be his own brother. But how one can prove it rigorously?
I am going to suggest some reasonable background assumptions:
There are a large number of individuals, of whom half are men and half are women.
The individuals ...
@TZHX Almost certainly not. I don't recall if Activity Monitor counts logical reads across all executions (100 x 10m = 1g reads) but even if it does, that doesn't mean SQL Server read the whole 8KB page each time it was touched in memory (which is what logical reads counts). Things like nested loops joins mean the same pages get touched over and over again, often to test and return one row each time.
@ypercubeᵀᴹ That's been floating around the HNQ for a few days. Still haven't clicked it.
@PaulWhite does this question really needs bounty, I mean I think OP is just misreading the result. I guess difference is aptly mentioned in BOL dba.stackexchange.com/questions/139214/…
@Shanky I'll try to find time later (no promises, I am very busy just now). The point of adding the bounty was so that other people would answer. I know I could answer it if I read everything there, check the documentation, and do some tests ... but that's exactly what I was avoiding.
@Zane probably to some extent. I remember being very interested in math but getting terribly bored by teachers that didn't really understand numbers. They tend(ed?) to get very hung up on the procedural method of arriving at an answer without actually realizing there are a number of ways to get there.
@bluefeet I'll have you know my tab stays open daily weekdays ;-)
So, we are hiring a Data Architect ... anyone got a good list of questions/resource to help narrow down the search? I feel like I would know a good candidate if I interview one, but I wouldn't mind some good resources to help me dig a little deeper. I can share the list I have currently if anyone wants to see it.