Questions tagged [indexing]
The indexing tag has no summary.
71 questions
1
vote
3
answers
296
views
How to implement an DB index to allow intersection queries on a database which does not support compound keys? [closed]
I am creating a DB that indexes JSONs on top of a key value storage engine (LMDB or somewhat similar).
When a new JSON needs to be indexed, I will create an entry for each field (AKA, JSON key), for ...
0
votes
1
answer
225
views
Hash Indexes vs LSM trees with SSTables
I was reading Designing-Data Intensive Applications, and I am confused about the usage of LSM trees with SSTables.
The author talks about Hash Indexes and log files (written as segments which are ...
2
votes
2
answers
194
views
Do we have 2 logical query processings, one with indexes and one without indexes?
In the book "Inside Microsoft® SQL Server® 2008: T-SQL Programming" the behaviour of a sql query is explained. The following picture is taken from the book. I have some questions about the ...
1
vote
2
answers
154
views
Secondary indexes vs Using elastic search
When does it make sense to put data in elastic search vs creating secondary indexing on Primary datastore?
Elastic search with another primary store
Pros:
Primary datastore can be optimised for read ...
2
votes
3
answers
1k
views
How to keep track of Indices
I've discovered my biggest issue with practicing interview questions and writing software more generally is keeping track of indices in python, maybe partly because my first two languages were the 1-...
-2
votes
1
answer
210
views
Database index - Basic understanding
Trying to clarify my knowledge on databases and indexes. I'd like to know how exactly it works. So I have a few questions:
When indexing a table over column or set of columns, a new table is created ...
-1
votes
1
answer
268
views
A data structure / algorithm to combine search tree and hash table?
I have a two dimensional data with one dimension is ordered and another one is categorical, for example, country and city_age:
country
age
city
Italy
2773
Rome
Germany
784
Berlin
USA
397
New York
...
0
votes
1
answer
119
views
Why does SQL Server prefer to order this result set on a nonclustered index rather than the clustered index?
It's common knowledge that the order of records from a simple one-table query is not guaranteed to be in the order of the primary key/clustered index. Adding a simple ORDER BY is no problem of course, ...
-1
votes
2
answers
147
views
1D coordinate to 2D coordinates without defining a stride
I'm in a situation that basically boils down to storing values based on 2 ID's. The ID's are sparse, from different ID pools and pretty much unpredictable so the naive approach is to just store the ...
2
votes
1
answer
811
views
Alternatives for index arrays
I work on a C++ project where I am not really happy with the data structures. The question isn't that specific to C++, I think that I would face a similar issue in say Java or Python.
There are data ...
1
vote
1
answer
4k
views
Is it ok to use redis scan extensively?
In redis docs, it is stated that keys command should not be used in production, since it blocks other processes while executing, it is better to use scan iteration over all keys with some batch size.
...
-1
votes
5
answers
2k
views
Why is converting 0-indexed code to 1-indexed code non-trivial?
The disadvantages of 1-indexing are well-known. However, our hand is sometimes forced by our choice of language and we have to convert algorithms that were intended for a 0-indexed language to being 1-...
1
vote
1
answer
653
views
Custom File System Index/Cache - How to save index
I've got an extremely oniony(deep) folder structure which contains Appx 1,000,000 text-based files on a network share. Using windows search is extremely slow and unreliable. I've created some text ...
1
vote
2
answers
317
views
Dealing with complex uniqueness in MongoDB
I am creating a booking system that will allow users to make a reservations for whole days. When a user wants to initially make a reservation, they select the day(s) and then will have 10 minutes to ...
-3
votes
3
answers
1k
views
If data is stored in RAM, do we still need index into data?
Is the purpose of the indexing data structures to address the limitations of disks?
If data is stored in RAM, do we still need index into data? Thanks.
Question comes from Design Data Intensive ...