You are viewing a single comment's thread from:
RE: Looking at the numbers from Steepshot // January - May 2018
A better query would be using a CONTAINS to get all the steepshot tag and then followed by LIKE, which makes the query much more faster and efficient. In addition to that, the created column doesn't need to have CONVERT.
A sample query:
SELECT
*
FROM Comments
WHERE
depth = 0 AND
CONTAINS(json_metadata, 'steepshot') AND
json_metadata LIKE '%app": "steepshot%' AND
created > '2018/06/12'
Thank you. But I'm trying to get data of post made from steepshot app and not steepshot tag analysis
if you read closely, the first line will do a full text search on json_metadata containing 'steepshot', and then compare with the next line. I suppose this will be quicker.
tagging @arcange to verify this
your code above returns about 10 rows of data only. and the * picks all info from the comments table and i don't need a lot of them
hmm, you are right. I was reading the doc on CONTAINS, but I presume it's a full text search.
https://docs.microsoft.com/en-us/sql/t-sql/queries/contains-transact-sql?view=sql-server-2017
try this
I tested, the query takes less than 30 seconds to get data, which is much faster then ur query
The benchmark test (not completed):
took some time to load and didnt load complete