caching - Get last few query results in SQL -


i static analysis of sql databases, during have luxury of nobody being able change data except me.

however, have not found way 'tell' sql in order prevent running same query multiple times.

here do, first start complicated query has small output.

select * mytable myproperty = 1234 

then run simple query same window (mostly using sql server studio if relevant)

select 1 

now realize forgot save results first complicated (slow) query.

as know underlying data did not change (or if did) 1 step , result. @ moment don't know trick , have run entire query again.

so question summary is: how can (automatically store/)get results executed queries.

i particulary interested in simple select queries, , happy allocate 100mb memory automated result storage. prefer solution works in sql server studio t-sql, other sql solutions welcome.


edit: not looking way manually prevent happening. in cases can anticipate problem not happen.

i going suggest run each query script counter (stored in table) increased each time query executed (i.e. i++) , storing each query in temp table called "tmptable" + i, sounds complicated manage. right?

then googled , i've found tool pack: didn't try take look:

http://www.ssmstoolspack.com/features

hope helps.

edit: added folliwing link. there's option output xml file , mention sql server integration services possible solution too. http://michaeljswart.com/2012/03/sending-query-results-to-others/#method5

second edit: there's dbms-independent tool too, sounds interesting:

http://www.sql-workbench.net/


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -