database-performance

Neo4jPhp too slow

☆樱花仙子☆ 提交于 2019-12-13 03:58:09
问题 Today i have written first basic program for Neo4j from PHP. This was basically done to check out if we could use Neo4j in our new project from PHP by using Neo4jPhp. https://github.com/jadell/neo4jphp here is my code <!DOCTYPE html> <html> <body> <h1>My first PHP page</h1> <?php include 'neo4jphp.phar'; echo "Hello World!"; // Connecting to the default port 7474 on localhost $client = new Everyman\Neo4j\Client(); $queryString = "MATCH (n)". "RETURN n"; $query = new Everyman\Neo4j\Cypher

Self outer Join alternative for inserting into Physical table from Temp table

不想你离开。 提交于 2019-12-12 18:24:39
问题 How to improve the performance of this query? INSERT INTO ABC(TRACKING_ID,GROUP_ID,ETL_NUM,ENTITY_ID,UNI_ID,DOS_TO) SELECT A.TID,A.TID2,A.ETL_NUM,A.ENTITY_ID,A.UNI_ID,A.DOS_TO FROM #TEMP A(NOLOCK) LEFT OUTER JOIN #TEMP B(NOLOCK) ON A.TID=B.TID AND ETL_NUM<B.ETL_NUM WHERE B.TID IS NULL I have 11 million records. It takes 9 hours to process this query. For tuning this query i have added index on Temp table ETL_NUM. But it didnt improve performance. I don't have Admin privileges on DB. 回答1:

Why MongoDB different query plans show different nReturned value?

左心房为你撑大大i 提交于 2019-12-12 10:13:59
问题 I have a collection faults in my MongoDB database which every document has these fields: rack_name , timestamp Just for sake of testing and comparing performances, I have created these two indexes: rack -> {'rack_name': 1} and time -> {'timestamp': 1} Now I executed the following query with explain(): db.faults.find({ 'rack_name': { $in: [ 'providence1', 'helena2' ] }, 'timestamp': { $gt: 1501548359000 } }) .explain('allPlansExecution') and here is the result: { "queryPlanner" : {

Performance impact of not closing propel connection

陌路散爱 提交于 2019-12-12 04:20:22
问题 I'm using symfony 1.4/propel 1.4 for a project, which was made by other developer earlier. On that project, propel connection is taken by using following code $con = Propel::getConnection(UsersPeer::DATABASE_NAME, Propel::CONNECTION_WRITE); However it never closes the connection using Propel::close(); I just searched that there are 1500+ such incidents of opening connection & I guess none of them is closing connection. I know its always good practice to close connection but in present case,

Maximizing Performance with the Entity Framework [duplicate]

戏子无情 提交于 2019-12-12 04:17:47
问题 This question already has answers here : How to “warm-up” Entity Framework? When does it get “cold”? (5 answers) Closed 3 years ago . I am developing travel web site. When user input a location for search(autocomplete) my action return all cities, that cities regions, regions, regions translations, hotels..... which start with user input I used Entity code first. But it is response time is too much. How can I optimize this? How can I decrease time? public JsonResult AutoComplateCityxxxxxxxx

Effective way to delete duplicate rows from millions of records

北慕城南 提交于 2019-12-12 03:28:04
问题 I am looking to find an effective way to delete duplicated records from my database. First, I used a stored procedure that uses joins and such, which caused the query to execute very slow. Now, I am trying a different approach. Please consider the following queries: /* QUERY A */ SELECT * FROM my_table WHERE col1 = value AND col2 = value AND col3 = value This query just executed in 12 seconds, with a result of 182.400 records. The row count in the table is currently 420.930.407, and col1 and

Entity Framework core select causes too many queries

淺唱寂寞╮ 提交于 2019-12-11 18:38:18
问题 I have the following method which is meant to build me up a single object instance, where its properties are built via recursively calling the same method: public ChannelObjectModel GetChannelObject(Guid id, Guid crmId) { var result = (from channelObject in _channelObjectRepository.Get(x => x.Id == id) select new ChannelObjectModel { Id = channelObject.Id, Name = channelObject.Name, ChannelId = channelObject.ChannelId, ParentObjectId = channelObject.ParentObjectId, TypeId = channelObject

Performance on updates using cursor in PostgreSQL

风流意气都作罢 提交于 2019-12-11 16:02:22
问题 I would like to know the performance difference in updating a table using the following method: UPDATE films SET kind = 'Dramatic' WHERE CURRENT OF c_films; or like this: UPDATE films SET kind = 'Dramatic' WHERE unique_indexed_int_column = 3000; Has anyone tested this or know how updates using cursors work so they can comment on this? EDIT: I have now benchmarked this and found that it is infact around a third faster to do the latest example. I ran each of the queries 100000 times and timed

Postgres `gin_trgm_ops` index not being used

℡╲_俬逩灬. 提交于 2019-12-11 15:56:53
问题 I'm trying to speed up some text matching in Postgres, using the pg_trgm extensions: CREATE TABLE test3 (id bigint, key text, value text); insert into test3 values (1, 'first 1', 'second 3'); insert into test3 values (2, 'first 1', 'second 2'); insert into test3 values (2, 'first 2', 'second 3'); insert into test3 values (3, 'first 1', 'second 2'); insert into test3 values (3, 'first 1', 'second 3'); insert into test3 values (4, 'first 2', 'second 3'); insert into test3 values (4, 'first 2',

Linq To Sql Category Sub Category Count Performans

家住魔仙堡 提交于 2019-12-11 15:55:21
问题 Product Table : ID Name ... Category Table : ID ParentCategoryID Name ProductCategories Table : ID CatID ProdID and.. ProductCategories in CatID foreign key and ProdID foreign key multiple SQL queries instead of a single query. How to query? List<NameIDCountList> NameIDCountList = LINQ ? public class NameIDCount { public int ID {get;set;} public string Name { get;set;} public int Count { get;set;} } public class NameIDCountList { public NameIDCount _Category { get; set; } public List