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
250 views

MySQL interval search query suggestions

My database structure is: ...
friday-json'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
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
2 votes
2 answers
52 views

Querying nearest city with a given shop using latitude and longitude is slow

I am using the following query to search for the nearest city to my location from the cities table using latitude and longitude. The query also checks whether the nearest cities to my location have ...
Lovejeet's user avatar
1 vote
1 answer
175 views

Search by parameters from multiple tables

I wrote a query that searches people based on search parameters from 3 other tables (phones, ...
potato's user avatar
  • 1,122
0 votes
2 answers
79 views

Improving/ Optimizing Performance Query in MySQL PHP

I have invoices, invoices_items, order, order_items. <...
smdhkv's user avatar
  • 1
2 votes
0 answers
72 views

Calculating effective shop inventories (SQL)

This is an SQL version of that question. Shops and groups The problem domain is a collection of shops (identified by an int shop_id number) each of which is ...
pk72's user avatar
  • 113
11 votes
1 answer
339 views

Science Fiction Wall of Fame (Shame?)

I have a few of hobbies, one is reading science fiction and fantasy and another is coding solutions. I thought I might have a chance to combine both hobbies on this project. I have well over 1500 ...
pacmaninbw's user avatar
  • 25.7k
6 votes
1 answer
5k views

Fastest way to insert rows in mysql vs sqlserver (large dataset)

I'm looking for any possible improvements that could be made to run the mysql piece of code faster. I created a simple test winform application that creates two docker databases : Sqlserver on linux ...
A_V's user avatar
  • 183
1 vote
1 answer
36 views

Classifying counts of repeat visits per user for a website

I am trying to get number of times (or sessions) a user re-visited the website. What I'm trying to find out- Get the total number of users, number of sessions in the last 30days. I need to a pie ...
bozzmob's user avatar
  • 111
1 vote
1 answer
63 views

MySQL query to select number of fields occurring more times than x

I want to find out the 'rank' of a word in any given language. A word with a rank of 1 means it's the most commonly used word in the language. There are two MySQL ...
twharmon's user avatar
  • 313
4 votes
1 answer
167 views

PHP Laravel function to search for ads in MySQL

I am new to the Laravel framework. I have recently written a function which gets called through a route. The function is created for two purposes: Get ads from a particular city based on provided ...
Khawar Raza's user avatar
3 votes
2 answers
212 views

Program for entering 1000 random numbers into two different databases, one for odd numbers and one for even

I have created a program in java for entering 1000 random numbers into two different database one for odd numbers and one for even. The code is executing fine but it takes nearly a minute to execute. ...
sujitha's user avatar
  • 31
5 votes
2 answers
135 views

Determine number of times an id was used with a domain IP

This is a slow query and the table has 50 million rows. Table named 'log': ...
ndelucca's user avatar
  • 153

15 30 50 per page
1
2 3 4 5 6