Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
147 views

I have table saa_prices (id, symbol, price, date). And I create view to query quarterly prices. CREATE OR REPLACE VIEW saa_quarterly_prices_final1 AS WITH last_dates AS ( SELECT symbol, ...
user1633272's user avatar
  • 2,343
0 votes
1 answer
76 views

I have some data: id parent_id topic_id 1 1 2 1 1 3 2 4 3 2 parent_id has FK to id. I'm trying to delete data by topic_id - as U see, one row is referencing to another row which both are to be ...
JohnSmith's user avatar
  • 500
0 votes
1 answer
55 views

I have a stored procedure that runs daily to archive data from a large table. It moves data in batches of 10,000 rows from table_name to table_archive_table, and deletes the moved rows from table_name....
Billy Hsu's user avatar
0 votes
0 answers
12 views

I am doing global convert for database fields - ints to bigint unsigneds, etc. But hitting a FK-ed field returns error: SQLSTATE[HY000]: General error: 3780 Referencing column 'local_id' and ...
JohnSmith's user avatar
  • 500
0 votes
1 answer
51 views

As part of a maintenance activity we have started deleting unwanted data from our database tables. This is being done to free up space and improve the I/O operation efficiency of our database tables, ...
sapna keswani's user avatar
1 vote
4 answers
84 views

I have a query that is extensively used for keyword searches. Due to the large volume of data in the table, the query takes a significant amount of time to execute. The query also includes ORDER BY ...
Ashik K's user avatar
  • 33
0 votes
1 answer
172 views

In MySQL 8 app table sessions has date defined as last_activity int NOT NULL. I see timestamp in dbeaver 24 as an integer value and I wonder if there is a way to format this date in human-readable ...
mstdmstd's user avatar
  • 3,331
0 votes
1 answer
66 views

CREATE TABLE `tmp` ( `wid` bigint unsigned NOT NULL, `simhash` binary(255) NOT NULL, PRIMARY KEY (`wid`), UNIQUE KEY `u_simhash` (`simhash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=...
Aario's user avatar
  • 635
2 votes
2 answers
200 views

I have a situation where we are storing tags in a JSON array, and the client started using this as a key-value store. I now need to add a way to search this data case-insensitively. As an example, if ...
hackel's user avatar
  • 1,279
0 votes
1 answer
122 views

I'm using MySQL: Server version: 8.0.36 Homebrew I'm trying to remove the default value of a column (currently set to 0), and it's erroring: ALTER TABLE comments ALTER COLUMN commentable_id integer ...
Max Williams's user avatar
2 votes
2 answers
105 views

(SELECT 1 `a`) UNION (SELECT 2 `a`) ORDER BY `a` DESC LIMIT 1 is a perfectly valid query in MySQL and as far as I can tell the same as SELECT 1 `a` UNION SELECT 2 `a` ORDER BY `a` DESC LIMIT 1 ...
Rolf van de Krol's user avatar
0 votes
2 answers
70 views

I have a dataset that tracks user activity, and I need to identify consecutive rows where a specific condition is met. The table structure and sample data are as follows: Table: UserActivity UserID ...
walkingbas's user avatar
1 vote
1 answer
94 views

I recently upgraded the character set of my MySQL database from utf8mb3 to utf8mb4. One of my table columns is defined as an ENUM('saved', 'updated', 'deleted') NOT NULL DEFAULT 'saved'. However, ...
johnd3v's user avatar
  • 13
-2 votes
1 answer
103 views

This code is part of what is used to import data from a text file to a WordPress database: mysqli_query($cons, ' LOAD DATA LOCAL INFILE "'.$file.'" REPLACE INTO TABLE ...
Danel October's user avatar
0 votes
2 answers
1k views

I recently upgraded to MySQL 8.4, and I just noticed my C drive is almost full. After looking into it, I realized that MySQL has been creating a bunch of files called "binlog.XXXXXX" where ...
Ricky's user avatar
  • 883
0 votes
1 answer
344 views

I tried to create the quartz table with a user that has privilege as below. Privileges: [Select, Insert, Update, Delete, Create, Drop, File, Index, Alter, Show databases, Create temporary tables, Lock ...
Jimmy Chi Kin Chau's user avatar
0 votes
1 answer
35 views

Since DBI Version 1.2.3, the format used to encode datetime objects as strings has changed: DBI 1.2.1: > DBI::dbQuoteLiteral(DBI::ANSI(), as.POSIXct("2023-04-05 12:34:56")) <SQL> '...
BrokenPhysics's user avatar
0 votes
0 answers
120 views

I have a function that uses GROUP_CONCAT. On my local database if the function tries to concatenate more than the value of group_concat_max_len, it just gives me a string of that size, without ...
Elias Lopes Salmoria's user avatar
0 votes
1 answer
800 views

Nginx as reverse proxy without ssl works fine Nginx reverse proxy for mysql without ssl, however when I enable ssl, no more connections can be established. Ssl certificate is issued to lets say my....
MarekChr's user avatar
  • 1,196
0 votes
0 answers
36 views

In most systems you need a global, endlessly increasing sequence number. With MySql the only way I know to do it is, make a new small table for the purpose: mysql> CREATE TABLE `ubersequence` ( ...
Fattie's user avatar
  • 9,780
0 votes
0 answers
57 views

hello am always getting mysql syntax error , check the version etc .. $databaseName = sprintf("%s_%s", substr($this->user, 0, 8), $installationData['worldId']); // Create database ...
Majed Faraj's user avatar
2 votes
2 answers
116 views

We are upgrading MySQL from 5.7 to 8.0. Table cuatom_shapes has column shape with SRID=0, in which few rows have data with GEOMETRYCOLLECTION and few other rows have data with POLYGON. Though column ...
pramodtech's user avatar
  • 6,270
0 votes
1 answer
60 views

We are upgrading our project from Mysql 5 to Mysql 8. there is weird issue coming in db queries in date handling. On MySQL 5, while saving data to db, the date used to be saved with 'yyyy-MM-dd HH:mm:...
amangautam1's user avatar
0 votes
2 answers
319 views

I'm created a migration to add a few tables and update one table (add one column). The database is MySQL 8.0.31 and the EF provider is Oracle's MySql.EntityFrameworkCore The migration was completed ...
Think_Twice's user avatar
0 votes
1 answer
207 views

The issue is coming after up gradation of mysql 8.0.28. I have a table called user_products. When I run the EXPLAIN SELECT query on it, the possible keys identified are user_id, productId, status, ...
tafsir's user avatar
  • 49
1 vote
1 answer
61 views

It's been a while since i used MySQLWorkbench to make queries and i'm kinda lost here. I want to update a row in a table named last_export that refers the last time a specific app had access to the ...
Théo Matrod's user avatar
0 votes
1 answer
247 views

In this moment I'm using SQLSERVER to store json data into a Table. I do it using OPENJSON. Here is an example how I do it: INSERT INTO myTable (ColA, ColB, ColC) SELECT jDataA, jDataB, jDataC FROM ...
Desenfoque's user avatar
2 votes
1 answer
2k views

Note: I did look up other answers, but they all seem to be for MySQL 5.x. MySQL 8 has made huge strides in ease of altering tables so I am looking for mySQL 8 specific answers. I'm using MySQL 8.0.36 ...
user984003's user avatar
  • 29.9k
0 votes
0 answers
45 views

I have a table like this: CREATE TABLE `sessions` ( `id` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', `access` int unsigned DEFAULT NULL, `data` mediumtext, ...
tvanc's user avatar
  • 4,386
0 votes
1 answer
34 views

Say I have these two tables table REQUESTS: ID_REQUEST USER 1 Adam 2 Ben 3 Charlie table REVIEWS: ID_REVIEW ID_REQUEST REVIEW 1 1 APPROVED 2 1 APPROVED 3 1 DENIED 4 2 APPROVED 5 2 APPROVED I would ...
Letruc's user avatar
  • 3
0 votes
0 answers
772 views

I have a query SELECT `property_category_name` as `property_category` FROM `listings` WHERE ( community_name LIKE '%Sun%' ) AND `listings`.`property_for` = 'sale' LIMIT Now when i am executing this ...
Ahtisham Ashraf's user avatar
0 votes
0 answers
114 views

i have a problem in update mysql version of my application, 8.0 version causes a 300% more loewst process in database compare of 5.7 version. Any sugestions or cases for improve performance in this ...
user2968757's user avatar
0 votes
1 answer
608 views

From the columns 1-4 in the table below I'd like to create a query that can return columns 5 & 6: my_date cat_1_id cat_2_id my_value cat_2_id_1_value cat_2_id_2_value 01/01/2024 1 1 1 1 Null 01/01/...
Jossy's user avatar
  • 1,131
0 votes
2 answers
126 views

I am trying to use covering index (with a functional index) in MySQL 8.0.28 to speed up a group by query on a large InnoDB table. Covering index created: ALTER TABLE `sp_files` ADD INDEX `...
Zoltan Fedor's user avatar
  • 2,127
0 votes
1 answer
37 views

Referring to Timestamp Lookups Documentation https://dev.mysql.com/doc/refman/8.3/en/timestamp-lookups.html In the documentation there is an example how UTC to Local TimeZone can cause descrepenices ...
user1428716's user avatar
  • 2,136
0 votes
1 answer
763 views

I'm wondering why this query shows different results in different versions of MySQL when I change offset. This is my query SELECT users.partner_id, users_summaries.total_count, users....
Nguyen Ruby's user avatar
1 vote
0 answers
50 views

Writing a JOIN statement and forgetting the corresponding ON clause is a common mistake and some DBMS can show errors or warnings in such cases. In MySQL 8, is it possible to report or prevent queries ...
Maarten Troost's user avatar
4 votes
1 answer
323 views

We carried out an upgrade of a production system recently, from mysql5.7 to mysql8. This was extensively tested on CI, local environments, staging. All queries ran as expected. With the move to mysql8 ...
M1ke's user avatar
  • 6,436
1 vote
0 answers
991 views

I searched a lot regarding this matter but unfortunately, I could not find anything helpful. I have an application in JAVA EE deployed in Payara Glassfish server. This application connects with SSL in ...
geminal's user avatar
  • 29
0 votes
3 answers
134 views

Apparently, sorting is somehow applied incorrectly in mysql 8 (checked on 8.0.33 to 8.0.35) when query has ORDER BY + GROUP BY + GROUP_CONCAT() + COUNT(*) OVER() window function. See test case below (...
lxa's user avatar
  • 3,372
11 votes
1 answer
3k views

I am trying to empty the content of a table using the following command: TRUNCATE TABLE <table_name>; The table engine is InnoDB. Upon executing this command, I receive the following error: SQL ...
kant312's user avatar
  • 1,414
0 votes
0 answers
493 views

Recently we changed version of RDS mysql from 5.7 to 8.0 by using blue/green deployment. first we put our green instance in 5.7 version later we upgraded the instance and switched over successfully....
ramya m's user avatar
2 votes
1 answer
1k views

We upgraded our RDS database on AWS from MySQL 5.7 to MySQL 8. The server Character Set and Server Connection are set to UTF-8 Unicode. That's utf8mb4 and utf8mb4_unicode_ci, respectively. But the ...
mikey_w's user avatar
  • 1,777
0 votes
0 answers
104 views

On MySQL 8.0.34, errors 1217 and 1452 represent the same thing but provide less information in the former case by design. A user without the relevant grants should not see the information about a ...
Chris Broz's user avatar
-1 votes
1 answer
76 views

I have a simple select query which earlier in mysql 5.7 version used to work in 850 ms is now taking 2.20 seconds to run. SELECT c.id, c.cart_type as cartType, c.name, c.storefront_id as storefrontId, ...
Shivangi Sharma's user avatar
2 votes
0 answers
1k views

Edit: I found a solution, but not sure that it is the definitive answer. Information at the end of the post. On AWS RDS, I have created a read replica from a master database running 5.7.44 (extended ...
johanmynhardt's user avatar
2 votes
1 answer
231 views

Environment Mysql 8.0.35 My Situation I want to get all rows if cancel.cancels[*].cancel_no is exactly "202401215050123". and also I want to use multi value index to optimize the query. ...
Jerry's user avatar
  • 523
0 votes
1 answer
570 views

Trying to calculate the RANK of a ticket from the Table, on MySQL 8 getting "You have an error in your SQL syntax", but is working fine on lower MySQL versions. Cannot figure it out, Thank ...
Speego's user avatar
  • 73
0 votes
2 answers
726 views

I have an application that runs on PHP 5.6 and Laravel 5.2. It's hosted in AWS on an AWS Linux 1 EC2 machine. This web server connects to a RDS MySQL instance. The RDS instance has been running ...
Lloyd Banks's user avatar
0 votes
1 answer
77 views

I have a MySQL 8 database table like this: +-------+ | Total | +-------+ | 100 | +-------+ | 40 | +-------+ I want to get the difference between the rows -> result = (row - (row + 1)) Before ...
Qmails's user avatar
  • 123

1
2 3 4 5
19