Skip to main content

All Questions

Tagged with
3 votes
1 answer
136 views

Faster Query to Track State changes in a Large Table

I have a table that tracks state changes of an entity with timestamps. The schema of the table is as follows: entityid userid originalvalue newvalue changetime 255 101 Draft Submitted 2023-11-28 12:10:...
Fatal Error's user avatar
2 votes
1 answer
93 views

Determining the least dangerous tags with over 1K answers to answer

So I thought I'd take another shot at making a SEDE query after being somewhat inactive after a while. Essentially what this does is that it takes the tags that have at least 1000 answers for that tag ...
CrSb0001's user avatar
  • 499
6 votes
1 answer
909 views

Show how close a user is to being unsung

So this morning, I decided to create a SEDE query that answers the age-old question "How close am I to being Unsung?" because I recently polished up my first SEDE query and I realized that I ...
CrSb0001's user avatar
  • 499
2 votes
1 answer
250 views

MySQL interval search query suggestions

My database structure is: ...
friday-json's user avatar
3 votes
3 answers
120 views

Improving efficiency of database searches under SQLite (SpatiaLite - QGIS)

I'm new to SQL, but I've always heard that it's a very efficient way of searching databases. For the same task, in VBA I get a result in a few seconds for 1000 queries. In SQL it takes several minutes....
Giene's user avatar
  • 169
0 votes
1 answer
45 views

Find and conditionally sort all venues matching a filter provided by an API client in PostgreSQL

I have an API where users can retrieve a list of "venues". Every venue is a profile, but not every profile is a venue Venues can be "parents" of other venues (think hotel - floor -...
Felix ZY's user avatar
  • 103
-1 votes
1 answer
252 views

Optimizing LINQ Query on C# Web API

Can someone help me optimize this code especially the LINQ query. It takes 8-12 seconds just to return a response when I'm calling the endpoint. Its super slow, and my whole endpoint call is taking ...
Kraust123's user avatar
3 votes
1 answer
86 views

calculating the percentage of distribution of ids per Loc for each country

Which of the two queries is theoretically better and why? I would like to understand why query 2 takes longer although there is no relevant information in the Execution Plan. I'm querying a Presto ...
Pin_Eipol's user avatar
1 vote
1 answer
81 views

Query for sequential column permutations in SQLite

For dummy's sake, let's say that I have a database with columns text, ind and sentid. You ...
Bram Vanroy's user avatar
1 vote
3 answers
190 views

SQL query joining applications to categories

I do have large database and my query takes about 2s to complete on production environment which is kinda slow and would like to ask is there a space for improvement? My initial inputs are ...
Marius's user avatar
  • 119
2 votes
1 answer
178 views

Prevent Column Name Collision

I have been working on a series of posts about a library to connect to databases but most of the scenarios I have to resort to some "JOIN" the problem arose when two or more tables had some ...
user avatar
0 votes
2 answers
45 views

Table-Value Function with row-level-locking

I'm implementing row-level-locking on a MS SQL Server. The function I created below works, but even with a very small data set, it takes a significant amount of time to return the results. If I were ...
rohrl77's user avatar
  • 181
4 votes
3 answers
2k views

Optimizing the insertion of 400 000 records in sqlite

I have the python script that creates a sqlite database and fills it with data (originally coming from a json file). At the time I execute the code below, my word ...
Pux's user avatar
  • 155
3 votes
2 answers
372 views

Archiving / Moving Data from one database server to another database server

I am working on an SMS marketing project based on Yii2 Framework (PHP 7.3 & MariaDb (innodb engine)) where we have to move the logs from different tables to the archive db, which is total a ...
Muhammad Omer Aslam's user avatar
2 votes
1 answer
72 views

Query to retrieve available stock

I have a query that outputs a list of products with some fields from other tables. That query works fine. Now, I'm attempting to retrieve the available stock for each product in that list. I'm not ...
Matías Cánepa's user avatar

15 30 50 per page
1
2 3 4 5
17