Skip to main content
Best practices
1 vote
3 replies
74 views

I'm using a table of approximately 1TB in a MySQL database. This table also has a monthly partition. We store the last two months of data in this table and regularly truncate the data from the ...
user1592429's user avatar
1 vote
5 answers
94 views

I use Postgres on my web server in order to record incoming queries into a table calls2, basically writing a single row each time with lots of repeating information, such as a date field ("when&...
Thomas Tempelmann's user avatar
0 votes
2 answers
178 views

I have a MariaDB table like this: CREATE TABLE metric_value ( id int(10) unsigned NOT NULL AUTO_INCREMENT, metric_id int(10) unsigned DEFAULT NULL, value decimal(17,2) unsigned NOT NULL, ...
planetp's user avatar
  • 16.6k
-1 votes
1 answer
103 views

I have an Excel file with approximately 300k records and I want to delete these rows from a SQL Server table. I tried using INSERT for each record but that takes way too long. I also tried to create a ...
Breezeicti's user avatar
0 votes
0 answers
23 views

If I have a very common shared table (ie. names) with a primary key (ie. name_id) included in many other tables as foreign keys, do I need my common table (names) to have a mapping reference to every ...
SofaKng's user avatar
  • 1,101
-1 votes
1 answer
58 views

Table_1 has a composite primary key: col_1, col_2. I find records that meet a certain criteria: select col_1, col_2 from thisTable where col_3 = 'criteria' Now I need to delete the records returned ...
Edwin Mercado's user avatar
4 votes
1 answer
227 views

I'm developing a REST API with Go and Gin framework that connects to Supabase. I've successfully implemented GET, POST, and PUT operations, but I'm having issues with the DELETE operation. What I've ...
Ryo Matsuzaka's user avatar
0 votes
1 answer
94 views

In Spring boot I have two entity classes import java.time.OffsetDateTime; import java.util.Set; import java.util.UUID; import jakarta.persistence.*; import lombok.*; import org.apache.commons.lang3....
Gianni Spear's user avatar
  • 8,058
3 votes
1 answer
107 views

My table: create table x( name text, group integer, primary key(name, group) ) I want to delete from it by primary key: delete from x where primary key in (["a", 1], ["a", 2]...
Alex's user avatar
  • 66.6k
3 votes
2 answers
117 views

I have prepared a DB Fiddle for my question and I will also show my complete code below - I am trying to store data in a vehicle_data table and each data record has an expires_at column: -- Create ...
Alexander Farber's user avatar
0 votes
1 answer
61 views

I have table_1 and table_1_history in PostgreSQL. I have setup a trigger for insert, update, delete on table_1. So any changes in table_1 will reflect to table_1_history and will create a new row. ...
Sachin's user avatar
  • 65
1 vote
1 answer
108 views

Both a delete and insert (range) on the same table are causing a deadlock due to contention on the same primary key index. I don't understand why. The locks taken are RangeS-S by each process and the ...
HAA's user avatar
  • 65
2 votes
1 answer
65 views

What I'm trying to achieve is a combined merge statement, that updates/deletes/moves data based on related metadata, somewhat like the following (MWS at the end): merge #data as target using #metadata ...
Johnny's user avatar
  • 45
0 votes
2 answers
96 views

I have a file which has 100 of records to get deleted from a table. I'm using cx_oracle connect connection with executemany statement from Python to Oracle SQL and trying to delete the entire 100 ...
Karthik's user avatar
0 votes
1 answer
269 views

I have a problem with an Oracle Connector. It should work as follows: 1 - Delete rows where the start date is equal to SYSDATE 2 - Insert data in that table 3 - Update rows with start date different ...
ennezetaqu's user avatar

15 30 50 per page
1
2 3 4 5
209