database-performance

Followers - mongodb database design

佐手、 提交于 2019-11-30 06:47:11
问题 So I'm using mongodb and I'm unsure if I've got the correct / best database collection design for what I'm trying to do. There can be many items, and a user can create new groups with these items in. Any user may follow any group! I have not just added the followers and items into the group collection because there could be 5 items in the group, or there could be 10000 (and the same for followers) and from research I believe that you should not use unbound arrays (where the limit is unknown)

how to load data faster with talend and sql server

谁说胖子不能爱 提交于 2019-11-30 05:29:57
I use Talend to load data into a sql-server database. It appears that the weakest point of my job is not the dataprocessing, but the effective load in my database, which is not faster than 17 rows/sec. The funny point is that I can launch 5 jobs in the same time, and they'll all load at 17rows/sec . What could explain this slowness and how could I improve the speed? Thanks New informations: The transfer speed between my desktop and the server is about 1MByte My job commits every 10 000 I use sql server 2008 R2 And the schema I use for my jobs is like this: Database INSERT OR UPDATE methods are

Performance Tuning : Create index for boolean column

不羁的心 提交于 2019-11-30 04:29:55
I have written a daemon processor which will fetch the records from one database and insert them into another database for synchronizing. It will fetch records based on each record indication flag which is boolean datatype. My tables has hundreds of thousands of records. When I select the record whichever sync_done is false, will it cause any database performance issues? Or should I apply indexing for that sync_done column (boolean datatype), to improve performance, since it will apply select operation on records with a sync_done value of false? For example, say I have 10000 records. Of those,

Optimization of count query for PostgreSQL

北城余情 提交于 2019-11-30 04:02:19
问题 I have a table in postgresql that contains an array which is updated constantly. In my application i need to get the number of rows for which a specific parameter is not present in that array column. My query looks like this: select count(id) from table where not (ARRAY['parameter value'] <@ table.array_column) But when increasing the amount of rows and the amount of executions of that query (several times per second, possibly hundreds or thousands) the performance decreses a lot, it seems to

MySQL Partitioning / Sharding / Splitting - which way to go?

ⅰ亾dé卋堺 提交于 2019-11-29 19:10:34
We have an InnoDB database that is about 70 GB and we expect it to grow to several hundred GB in the next 2 to 3 years. About 60 % of the data belong to a single table. Currently the database is working quite well as we have a server with 64 GB of RAM, so almost the whole database fits into memory, but we’re concerned about the future when the amount of data will be considerably larger. Right now we’re considering some way of splitting up the tables (especially the one that accounts for the biggest part of the data) and I’m now wondering, what would be the best way to do it. The options I’m

How many MySql queries/second can be handled by a server?

回眸只為那壹抹淺笑 提交于 2019-11-29 11:49:10
问题 I've started developing a browser (database) game. My question is how many queries can a regular hosting handle (when I mean regular, I mean a shared hosting you cand find for about 7$/month). As for the queries, nothing complicated (simple SELECT and WHERE operations). So... ? 10? 100 ? 10000? 回答1: Yoshinori Matsunobu in one of his articles claims 105,000 queries per second using SQL , and 750,000 queries per second using native InnoDB API . All queries are simple PK lookups. On a shared

Execute multiple functions together without losing performance

被刻印的时光 ゝ 提交于 2019-11-29 09:43:15
I have this process that has to make a series of queries, using pl/pgsql: --process: SELECT function1(); SELECT function2(); SELECT function3(); SELECT function4(); To be able to execute everything in one call, I created a process function as such: CREATE OR REPLACE FUNCTION process() RETURNS text AS $BODY$ BEGIN PERFORM function1(); PERFORM function2(); PERFORM function3(); PERFORM function4(); RETURN 'process ended'; END; $BODY$ LANGUAGE plpgsql The problem is, when I sum the time that each function takes by itself, the total is 200 seconds, while the time that the function process() takes

Performance Tuning : Create index for boolean column

我的未来我决定 提交于 2019-11-29 01:44:49
问题 I have written a daemon processor which will fetch the records from one database and insert them into another database for synchronizing. It will fetch records based on each record indication flag which is boolean datatype. My tables has hundreds of thousands of records. When I select the record whichever sync_done is false, will it cause any database performance issues? Or should I apply indexing for that sync_done column (boolean datatype), to improve performance, since it will apply select

save method of CRUDRepository is very slow?

被刻印的时光 ゝ 提交于 2019-11-29 00:21:16
i want to store some data in my neo4j database. i use spring-data-neo4j for that. my code is like the follow: for (int i = 0; i < newRisks.size(); i++) { myRepository.save(newRisks.get(i)); System.out.println("saved " + newRisks.get(i).name); } My newRisks-array contains circa 60000 objects and 60000 edges. Every node and edge has one property. The duration of this loop is circa 15 - 20 minutes, is this normal? I used Java VisualVM to search some bottlenecks, but my average CPU usage was 10 - 25% (of 4 cores) and my heap was less than half full. There are any options to boost up this operation

MYSQL performance slow using filesort

拈花ヽ惹草 提交于 2019-11-28 21:30:39
I have a simple mysql query, but when I have a lot of records (currently 103,0000), the performance is really slow and it says it is using filesort, im not sure if this is why it is slow. Has anyone any suggestions to speed it up? or stop it using filesort? MYSQL query : SELECT adverts .* FROM adverts WHERE ( price >='0' ) AND ( adverts.status = 1 ) AND ( adverts.approved = 1 ) ORDER BY date_updated DESC LIMIT 19990 , 10 The Explain results : id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE adverts range price price 4 NULL 103854 Using where; Using filesort Here is