indexing

simple lookup takes several minutes despite using an index

℡╲_俬逩灬. 提交于 2020-01-25 06:46:08
问题 I have a decently sized graph (~600 million nodes, 3.5 billion edges) that I imported into neo4j. The graph is also quite dense (median edge count around 10); though I'm not sure if that affects performance. For one type of node (:Authors) - there are roughly 200 million nodes of this type - I would like to run a query for a specific name, which is stored in the property normalizedName . Here is the (very simple) query: MATCH (a:AUTHOR) WHERE a.normalizedName = "jonathan smith" RETURN a As

simple lookup takes several minutes despite using an index

爱⌒轻易说出口 提交于 2020-01-25 06:46:04
问题 I have a decently sized graph (~600 million nodes, 3.5 billion edges) that I imported into neo4j. The graph is also quite dense (median edge count around 10); though I'm not sure if that affects performance. For one type of node (:Authors) - there are roughly 200 million nodes of this type - I would like to run a query for a specific name, which is stored in the property normalizedName . Here is the (very simple) query: MATCH (a:AUTHOR) WHERE a.normalizedName = "jonathan smith" RETURN a As

Why Index is used only when forced but not by default?

妖精的绣舞 提交于 2020-01-25 04:34:06
问题 I have around 420 million records in my table. There is an only index on column colC of user_table . Below query returns around 1.5 million records based on colC . But index is not used somehow and return the records 20 to 25 mins select colA ,ColB , count(*) as count from user_table where colC >='2019-09-01 00:00:00' and colC<'2019-09-30 23:59:59' and colA in ("some static value") and ColB in (17) group by colA ,ColB; But when I do force index, it starts getting used and returns the record

MySQL Slow join - but not always and not on all tables

二次信任 提交于 2020-01-24 20:26:21
问题 We're experiencing a performance issue with a MySQL database that's so weird we need another set of eyes to tell us whether we're going crazy or not. We've got 2 MySQL Certified Developers in the team, but all they can say is : "this is impossible". Anyway, here's the situation : we have a query that in theory should be reasonbly fast, but in reality is slow. If we slim down the query by removing 1 join, the query becomes extremely fast. If we remove a different join, it's still very slow,

Indexing documents using Solr results in Expected mime type application/octet-stream but got text/html

∥☆過路亽.° 提交于 2020-01-24 18:03:37
问题 What I am trying to do is to index document using Solr. I have installed and started Solr server on a Windows environment and I am trying to index using SolrJ. However when I try to add the solr document to the server as shown below it results in the an error server.add(indexDoc); Error Error from server at http://localhost:8983/solr: Expected mime type application/octet-stream but got text/html <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/update. Reason: <pre> Not Found</pre></p>

Indexing documents using Solr results in Expected mime type application/octet-stream but got text/html

五迷三道 提交于 2020-01-24 18:03:10
问题 What I am trying to do is to index document using Solr. I have installed and started Solr server on a Windows environment and I am trying to index using SolrJ. However when I try to add the solr document to the server as shown below it results in the an error server.add(indexDoc); Error Error from server at http://localhost:8983/solr: Expected mime type application/octet-stream but got text/html <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/update. Reason: <pre> Not Found</pre></p>

Indexing datetime in MySQL

孤人 提交于 2020-01-24 12:35:09
问题 What is the best way to index a datetime in MySQL? Which method is faster: Store the datetime as a double (via unix timestamp) Store the datetime as a datetime The application generating the timestamp data can output either format. Unfortunately, datetime will be a key for this particular data structure so speed will matter. Also, is it possible to make an index on an expression? For example, index on UNIX_TIMESTAMP(mydate) where mydate is a field in a table and UNIX_TIMESTAMP is a mysql

Why doesn't MySQL use the primary key on JOIN plus ORDER?

十年热恋 提交于 2020-01-24 08:11:08
问题 Here's a neat one for you (MySQL, obviously): # Setting things up DROP DATABASE IF EXISTS index_test_gutza; CREATE DATABASE index_test_gutza; USE index_test_gutza; CREATE TABLE customer_order ( id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, invoice MEDIUMINT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY(id) ); INSERT INTO customer_order (id, invoice) VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5); CREATE TABLE customer_invoice ( id MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, invoice_no MEDIUMINT

In MySQL, does putting SELECT foo increase in performance if foo is indexed?

邮差的信 提交于 2020-01-24 07:22:49
问题 In MySQL, does putting SELECT foo increase in performance if foo is indexed? At RedditMirror.cc, I have a database with 1.2 million records in the GrabbedSites table, a number that increases by approx 500-2000 per day. Early in my career, I was mentored that the only columns that should be indexed are those which you will do WHERE or JOIN SELECT/UPDATEs on in the future, need them to be UNIQUE data. Because of that, GrabbedSites only has one key indexed (besides the primary key): categoryID,

How does including a SQL index hint affect query performance?

二次信任 提交于 2020-01-24 05:06:15
问题 Say I have a table in a SQL 2005 database with 2,000,000+ records and a few indexes. What advantage is there to using index hints in my queries? Are there ever disadvantages to using index hints in queries? 回答1: First, try using SQL Profiler to generate a .trc file of activity in your database for a normal workload over a few hours. And then use the "Database Engine Tuning Advisor" on the SQL Server Management Studio Tools menu to see if it suggests any additional indexes, composite indexes,