Skip to main content
Sorry I inadvertently forked the original query for recent SEDE refresh
Source Link
Aaron Bertrand Staff
  • 43.5k
  • 11
  • 113
  • 206

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent refresh bumps up against midnight UTC on Sunday (which actually has nothing to do with the new views, and could have been done in the past):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 23:59 is modified at 00:20, that modification might be captured if the source row in Posts is read later than 00:20. But the corresponding PostHistory row will not be captured.

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent refresh bumps up against midnight UTC on Sunday (which actually has nothing to do with the new views, and could have been done in the past):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 23:59 is modified at 00:20, that modification might be captured if the source row in Posts is read later than 00:20. But the corresponding PostHistory row will not be captured.

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent refresh bumps up against midnight UTC on Sunday (which actually has nothing to do with the new views, and could have been done in the past):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 23:59 is modified at 00:20, that modification might be captured if the source row in Posts is read later than 00:20. But the corresponding PostHistory row will not be captured.
added 11 characters in body
Source Link
Aaron Bertrand Staff
  • 43.5k
  • 11
  • 113
  • 206

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent refresh bumps up against midnight UTC on Sunday (which actually has nothing to do with the new views, and could have been done in the past):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 1123:59 is modified at 00:20, that modification might be captured if the source row in Posts is read later than 00:20. But the corresponding PostHistory row will not be captured.

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent refresh bumps up against midnight UTC on Sunday (which actually has nothing to do with the new views, and could have been done in the past):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 11:59 is modified at 00:20, that modification might be captured if the source row is read later than 00:20. But the corresponding PostHistory row will not be captured.

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent refresh bumps up against midnight UTC on Sunday (which actually has nothing to do with the new views, and could have been done in the past):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 23:59 is modified at 00:20, that modification might be captured if the source row in Posts is read later than 00:20. But the corresponding PostHistory row will not be captured.
added 43 characters in body
Source Link
Aaron Bertrand Staff
  • 43.5k
  • 11
  • 113
  • 206

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent refresh bumps up against midnight UTC on Sunday (and thiswhich actually has nothing to do with the new views, and could have been done in the past):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 11:59 is modified at 00:20, that modification might be captured if the source row is read later than 00:20. But the corresponding PostHistory row will not be captured.

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent bumps up against midnight UTC on Sunday (and this actually has nothing to do with the new views):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 11:59 is modified at 00:20, that modification might be captured if the source row is read later than 00:20. But the corresponding PostHistory row will not be captured.

For an answer to your direct question:

How can one see when a query result was last cached in SEDE?

One can't. This information is simply not exposed to SEDE.

  • Cached plans and queries are cleared out during every refresh operation, so its age will always be 7 days or less (unless that specific step in the process fails).
  • If one is trying to defeat the cache (force their query to run again), see How can I avoid the Data Explorer cache?

For the reasoning behind your question:

It's useful to see if SEDE has refreshed.

There are much better and more direct ways to do this. rene used to use this query:

We recently added some views to Data Explorer in part to provide a lot more transparency into this process. With those views, a couple of ways you could check on us to be sure we actually performed the most recent weekend's refresh (along with exactly when it happened, how long each database took, and what data was included):

On any individual database, you can check to be sure that data from the most recent refresh bumps up against midnight UTC on Sunday (which actually has nothing to do with the new views, and could have been done in the past):

You could run that on any site, but there are some caveats:

  • Not every site has enough activity that this information will be conclusive. Some sites go days without Posts, so I use our busiest site as the model.
  • While we've attempted to fix the "jagged edge" problem - where the data included in SEDE depended on when a database was loaded - some straggling information can still get through. For example, if a post created at 11:59 is modified at 00:20, that modification might be captured if the source row is read later than 00:20. But the corresponding PostHistory row will not be captured.
Slight adjustment to query (removed ugly COLLATE)
Source Link
Aaron Bertrand Staff
  • 43.5k
  • 11
  • 113
  • 206
Loading
deleted 9 characters in body
Source Link
Aaron Bertrand Staff
  • 43.5k
  • 11
  • 113
  • 206
Loading
Source Link
Aaron Bertrand Staff
  • 43.5k
  • 11
  • 113
  • 206
Loading