Hello.
I am using MongoDB to store a lot of stats but the problem I am running into is insert/update speed. I am not utilizing all the IO or CPU. I am using about 30% of the CPU, 60GB of 132GB of RAM and I have 2x 4xSSD in a RAID 10. The server is not maxing out on anything but I can only get about 7k update/inserts per second. I created the 4 shards to try to help with write locks but only increased by 1k adding 2 more shards....
User Profile
Collapse
-
MongoDB Insert/Update From .NET
-
MongoDB Upsert
Hello,
I have nested BSON documents inside an array in the document. I would like to be able to add/update items without having to do so many queries to check if it exists. Is there an easier/more efficient way to do it? This is going to be done a few million times every hour.
Example structure
Code:/* 0 */ { "_id" : ObjectId("5205344a405a280bf8f3b1c5"),
-
Search Query
Hello,
I have a database of 100million rows and need to do a like statement with "%test%". I understand that it does not use an index and it is really slow and resource intensive.
Is there a way to use a Full Text search to get the middle of words? I know you can use word beginnings like '"test*"' but what about '"*test*"' and return the same results as a like "%test%"
... -
Basically, on the second question I would like to do this efficently:
Return Results of a search query (containstable, etc) depending on page.
Return Category Present in the all results queried above.
Return Total Number of Results
The results could be 100k but I want to return all the available categories and total count but only want to return 20 results based on what page they are on.
Sorry if... -
Code:;WITH cte_query AS ( SELECT V.*, ROW_NUMBER() OVER(ORDER BY VR.rank ASC) AS [row_number] FROM [dbo].[item_search_rank] AS VR INNER JOIN [dbo].[item_category] as A on A.id=VR.id AND A.category_id = @category_id INNER JOIN [dbo].[item_channel] as B on B.id=VR.id AND B.channel_id = @channel_id INNER JOIN [dbo].[vn] as V on V.id=VR.id AND (V.language_id=COALESCE(@language_id, V.language_id)
Leave a comment:
-
Paging
A few questions:
Is there a way to use a query multiple times? I know you can use a CTE but that will be removed after the next query and I do not want to create temp tables on a highly used database.
Is there a best practice for doing searches? For example, if someone searches "SQL" on 10mil rows, I want to return both the paged results but also show categories/total results/etc.
Lastly,... -
Query Cache Hit Rate
Hello,
Is it better to set the query cache rate to 0 if you only have 5GB of memory allocated to the MySQL DBs?
Thanks. -
TempDB issue
Hello,
I have database that is using high tempdb usage in MSSQL 2008. I found the query that is causing the issue and tried to streamline the query but it still has queries going into the tempdb and uses 100% of HDD which creates lag. The database has high usuage and is around 10million rows.
I have tried to create multiple tempdb files but those just increase the tempdb writing more.
Any suggestions...
No activity results to display
Show More
Leave a comment: