Data dodania Pytanie
2018-02-07 18:02 mysql best index order for (FK, key, value) »
I have a key value table: id, data_id, key, value that references a data table: id, file_id, data which in turn references a files table: id, n...
(1) odpowiedzi
2018-01-30 18:01 Slow performance on query despite indices »
I have a table with four columns |-----|-----|-----|-----------| | a | b | c | d | | int | int | int | timestamp | |-----|-----|-----|-...
(1) odpowiedzi
2018-01-25 16:01 Oracle - Indexes »
I have been wondering how I can improve this Query in Oracle: SELECT FN_FORMAT_PEROPE(PEROPE) AS PERIODO, NVL((SELECT COUNT(1) FROM PG_PAGO ...
(2) odpowiedzi
2018-01-25 12:01 PostgreSQL not using index scan over GIN index on JSONB »
I have a table in PostgreSQL containig one JSONB column. The JSON looks like this- {'key':some_key, 'value': some_value}. I indexed key in JSON using...
(1) odpowiedzi
2018-01-10 11:01 PostgreSQL does not use GIN index for query »
There is a query I use (there are OR blocks instead of large query_int because of better performance): SELECT * FROM products AS p WHERE (( p.descr...
(0) odpowiedzi
2018-01-06 20:01 index out of string, ruby »
Here's a small part of my code, pretty self explanatory, it copies all characters to temp from input and skips spaces. input = gets.to_s.chomp temp=S...
(3) odpowiedzi
2018-01-04 10:01 Postgresql: query on jsonb column - index doesn't make it quicker »
There is a table in Postgresql 9.6, query on jsonb column is slow compared to a relational table, and adding a GIN index on it doesn't make it quicker...
(2) odpowiedzi
2017-12-27 20:12 Pandas: Select values from specific columns of a DataFrame by row »
Given a DataFrame with multiple columns, how do we select values from specific columns by row to create a new Series? df = pd.DataFrame({"A":[1,2,3,4...
(2) odpowiedzi
2017-12-26 10:12 PostgreSQL OK to use HASH exclude constraint for uniqueness? »
Since hashes are smaller than lengthy text, it seems to me that they could be preferred to b-trees for ensuring column uniqueness. For the sole purpo...
(1) odpowiedzi
2017-12-23 21:12 Postgres getting an index already sorted by primary key »
I have a setup for forum posts and want to retrieve posts created by a specific user using the following query: SELECT * FROM forum.posts WHERE autho...
(1) odpowiedzi
2017-12-21 18:12 Single INNER JOIN of two well-indexed tables takes more than a minute to run »
I have a query that takes about 90 seconds to run even though the tables should have the right indexes. I don't understand why. I am using MySQL and...
(1) odpowiedzi
2017-12-21 08:12 Oracle 12c Insert without indexing but search with index »
I have a big database with a huge table consisting 80+ fields and 250million of rows. It also has 35 indexes! This is a big system and cant be shutdo...
(0) odpowiedzi
2017-12-20 11:12 Postgres - understanding indexes »
Using Postgres SQL - I have general question regarding indexing to improve efficiencies. What are the best indexes that should be created for the nex...
(1) odpowiedzi
2017-12-19 20:12 MongoDB Find performance: single compound index VS two single field indexes »
I'm looking for an advice about which indexing strategy to use in MongoDb 3.4. Let's suppose we have a people collection of documents with the foll...
(1) odpowiedzi
2017-12-16 20:12 Oracle endeca partial update changes not reflecting in endeca ref app »
I am trying to implement oracle endeca partial update . My changes are visible in the forge output file which is placed in the dgraph_input/updates di...
(1) odpowiedzi
2017-12-14 22:12 Create Postgres JSONB Index on Array Sub-Object »
I have table myTable with a JSONB column myJsonb with a data structure that I want to index like: { "myArray": [ { "subItem": { "...
(1) odpowiedzi
2017-12-05 18:12 Rails 4.2: Turn a reference field into foreign key »
I'm maintaining an old system that uses Rails 4.2 and for an unknown reason the references are created this way: t.references :credit_card, null: f...
(1) odpowiedzi
2017-12-01 13:12 .eq() out of order »
I'm trying to select the 3rd element of a JQuery object, by using eq() method. But for some reason the 2nd and 3rd selections pop out in changed order...
(2) odpowiedzi
2017-11-28 20:11 Creating GIN index on ILIKE postgres query »
I am using postgres 9.6. I store JSONB data in one column and I would improve performance of one query. In my json data I have name column which is te...
(1) odpowiedzi
2017-11-19 15:11 How to retrieve column selectivity metadata in MySQL, without creating an index? »
Assuming the following SQL query: SELECT col1,col2 from table where col1 > 5 and col2 > 8 I believe that MySQL won't be able to look up in bo...
(2) odpowiedzi
2017-11-16 11:11 Order a space matrix by index »
I have matrix space some locations 1, 2, 3, and 4 df<-matrix(data=c(0.00, 4.69, 12.63, 2.99, 4.69, 0.00, 17.30, 5.15, 12.63, 17.30, 0.00, 13.72, 2...
(2) odpowiedzi
2017-11-15 03:11 How do you order the indexing columns in MySQL if you are using order by in your query? »
I am reading an article about how Pinterest shards their MySQL database: https://medium.com/@Pinterest_Engineering/sharding-pinterest-how-we-scaled-ou...
(1) odpowiedzi
2017-11-06 20:11 Oracle Reverse Primary Keys »
I am trying to create a table with a reverse index on my primary key column. The table is created, and I have inserted a lot of data, generating a k...
(1) odpowiedzi
2017-10-28 16:10 PHP: How to sort an array of arrays by the value at index 0 »
I have an array with this structure in PHP: Array ( [0] => Array ( [0] => 32 [1] => 12323 ) [1] => Array ( [0] => 21 [1] =>...
(1) odpowiedzi
2017-10-18 19:10 Selecting single values from pandas dataframe using lists »
import numpy as np import pandas as pd ind = [0, 1, 2] cols = ['A','B','C'] df = pd.DataFrame(np.arange(9).reshape((3,3)),columns=cols) Say you hav...
(5) odpowiedzi
2017-10-18 00:10 Postgresql index seq scan 100 million rows »
I'm having an issue where a query that's indexed refuses to use the index, because it's not selective enough (let's say 60 out of 130 million rows mee...
(2) odpowiedzi
2017-10-16 10:10 Mysql query is too slow when order by datetime »
I have a table with about 10k rows. I run below sql but it's take too much time (~4 seconds): SELECT ID, post_date, post_title, post_name, pc...
(2) odpowiedzi
2017-10-13 12:10 Partial Index not used in ON CONFLICT clause while performing an upsert in Postgresql »
I have the following Entity Attribute value table : CREATE TABLE key_value_pair ( id serial NOT NULL PRIMARY KEY, key varchar(255) NOT NULL, ...
(1) odpowiedzi
2017-10-11 17:10 PostgreSQL - Will it ever use two indices on the same table? »
Say you have a table with some indices: create table mail ( identifier serial primary key, member text, read boolean ); create index on ...
(2) odpowiedzi
2017-10-10 01:10 postgres index optimization jsonb »
I am on postgres 9.5. I have a table which is as below CREATE TABLE public.info ( metadata jsonb, state text, active boolean name tex...
(0) odpowiedzi
2017-09-24 12:09 Why PostgreSQL not using index properly? »
Schema: create table records( id varchar, updated_at bigint ); create index index1 on records (updated_at, id); Query. It iterates over...
(2) odpowiedzi
2017-09-18 17:09 Adding add_index breaks 'times' iterator »
When I add this to my migration file, it breaks an rspec test: migration: add_index :SurveyResponses, [:ID, :QuestionID, :AnswerID, :LastEditedTimes...
(0) odpowiedzi
2017-09-11 22:09 Add unique constraint to an existing PostgreSQL index »
I have an index in my PostgreSQL 9.3 database: CREATE INDEX index_foos_on_bar_and_baz ON foos USING btree (bar, baz); (from a schema migration usin...
(1) odpowiedzi
2017-09-11 22:09 What happens when declaring an additional index on the primary key in Oracle SQL? »
I have a multi-part question: My journey began when I was trying to figure out if I can have descending/ascending primary keys in Oracle SQL. There...
(1) odpowiedzi
2017-09-10 12:09 Does adding an index on the column you are selecting speed up the query? »
I have a fairly common setup, I have a table of tags and record pairs. Querying it is slow so adding an index to the column of the tag I am querying h...
(2) odpowiedzi