0
votes
0answers
2 views

set global sql mode but showing a different mode

I have this command to run in my docker file mysql -e "SET GLOBAL sql_mode = 'STRICT_ALL_TABLES';" But when i check the mysql mode it shows as mysql> select @@sql_mode; ...
0
votes
0answers
6 views

Do Fixed-Width Rows Improve PostgreSQL Read Performance?

I have a table, we'll call it 'articles'. Table "articles" Column | Type | Modifiers ...
1
vote
2answers
17 views

MySQL - Small table popping up in slowlog, refuses to use index

So I have two very very small tables (~20 rows) that are hit very frequently and pop up in the slowlog (I'm also logging tables not using indexes). I tested using a large multipart index (that's just ...
1
vote
2answers
26 views

Charindex, Getting specific data from a string

Hello I am very new to charindex and have tried to create a query that would extract my needed information but am running into an error. I searched for similar problems on stackexchange as well as a ...
1
vote
1answer
20 views

How to use an alias name that has RANK() OVER in a WHERE clause

I have a query that has a RANK() OVER function inside it but I would like to use the results displayed on this column in the WHERE clause that follows. How do I write that as all the other questions I ...
1
vote
1answer
9 views

GIN index not used when adding order clause

I'm trying to speed up a query that executes three ILIKE queries and reduces these with or (returning the overall count and 10 entries) SELECT *, count(*) OVER() as filtered_count FROM "users" ...
3
votes
0answers
31 views

How can we improve this PIVOT operation? ( SQL Server 2008 R2 )

We have this query, that runs in 1:10. We need to improve this. This is just a test query, but we will implement this upgrade on our real query. select top 100 * from ( select codCliente ...
1
vote
0answers
11 views

Why am I getting error 1064 when creating a table?

Here is my DDL statement: create table if not exists 'fmrecruit'.'resource_type'( 'ID' bigint not null auto_increment, 'type' bigint null, 'first_name' varchar(30) not null, 'middle_name' ...
4
votes
0answers
16 views

Why does dm_os_memory_clerks have MEMORYCLERK_SQLCLR values on one NUMA node?

We are using a SQLCLR stored procedure for service broker activation, and I want to monitor the memory used by the CLR code. Looking at sys.dm_os_memory_clerks, I see that only NUMA node 1 has any ...
3
votes
1answer
138 views

Slow query in SQL Server 2014 fast in SQL Server 2012

During the migration of one of our databases from SQL Server 2012(SP1, CU2) to SQL Server 2014 (SP1) we have experienced some strange issues: One of the queries that completes within seconds on ...
2
votes
1answer
28 views

Conditional Foreign Key Relationship

I currently have a foreign key between two entities, and I would like to make that relation conditional to the entityType of one of the tables. Here's the hierachy of tables, this is done via FK ...
0
votes
1answer
26 views

INSERT from SELECT using a CURSOR

I have a table that looks like this: +====================================================+ | aid | uid | eid | name | dob | paid | ...
3
votes
1answer
18 views

Storing html in mysql text fields, or include files? (html formatted articles)

I'm wondering if I should store long html formatted articles in my MySQL database, or if it would be better to store a reference to a file, and include that instead. It is not just paragraphs, but ...
-2
votes
0answers
8 views

How to add analysis services to my existing SQL Server 2012?

I have my SQL Server 2012 installed and I want to connect to analysis services. When I get there I don't find any server to connect. Check the pic below: How to add a server for the analysis ...
1
vote
1answer
17 views

Query to know who paid more than 10k

I have a table with payment informations, like this: ID COSTUMER_ID DATEPAID AMOUNT 1 1 2012-01-01 50 2 1 2012-02-01 100 3 1 2012-03-01 70 4 2 ...
2
votes
1answer
25 views

Why is Oracle's dbms_metadata.get_ddl returning different results?

I'm trying to compare two schemas using dbms_metadata.get_ddl. The two schemas were created using exactly the same SQL scripts. However on one primary key I'm getting a difference in the DDLs: ALTER ...
2
votes
3answers
298 views

Best database to store and retrieve Word and Excel documents

My current project is to create a barcode system (for lack of a better word) that is linked to a database (was not given more information or directions). My task is to have a barcode scanner ...
0
votes
0answers
9 views

How do hierarchical databases records link together?

If I had a hierarchical database containing 3 tables: course, students, grades Course would be the root table and may have 10 course records in there. each course has its own selection of students, ...
3
votes
0answers
31 views

Which timeout(s) are causing my linked server query to time out?

We have two databases on linked SQL Servers that are partially synchronized. Occasionally, one side goes down for an upgrade, then the other goes down for an upgrade, and then we re-synchronize. ...
4
votes
2answers
56 views

Why would SQL Server remain unresponsive after a slow query completes?

I've just finished debugging a problematic SQL Server 2012 table-valued function. It was declared to use a unique column in the table: CREATE FUNCTION [dbo].[myApp_getUserIdsFromXml] ( ...
0
votes
1answer
15 views

MariaDB/InnoDB: Temp file write failure

When attempting to alter a table to enable compression by modifying the KEY_BLOCK_SIZE I received the error: ERROR 1296 (HY000): Got error 64 'Temp file write failure' from InnoDB The command ...
0
votes
2answers
18 views

Oracle RAC VIP issue

I have a two node RAC setup where my scan ips are registered in DNS and my public Ips are also registered in the dns. Now while connecting from my windows machine through oracle client in sql ...
0
votes
1answer
30 views

How is a hierarchical database made? [on hold]

I've never used a hierarchical database but am curious about how it works. A relational database uses primary and foreign keys and allows many to many relationships where as a hierarchical database ...
0
votes
1answer
11 views

Mysql datetime field partial match

Currently I am designing a mysql table structure that will hold a couple of million rows. I want to search in it on datetime field by date year and so on but the date will be entered by user so it ...
0
votes
0answers
6 views

MATLAB® export double numbers into PostgreSQL by `datainsert` (of Database Toolbox)

How is it possible to pass double numers into numeric postgreSQL columns from MATLAB? Here the list of matlab data: var1 197x1 cell var2 197x1 double var3 197x2 double var4 197x2 double ...
-1
votes
0answers
8 views

MongoDb performance with large data

Is there any bench-marking figure available for MongoDB with a very large data volume ? I intent to find a solution for an existing application where the main bottleneck being the database ( RDBMS at ...
-3
votes
0answers
15 views

PRODUCTION DATABASE HANDLING PROBLEMS [on hold]

I am working in watch company here in UAE. We source watch parts from different vendors operating in china. Most of the watches contains 8-10 components & each component is purchased by different ...
1
vote
1answer
17 views

Recording history of ranks

Once per day, this is being executed to rank everyone in the database based on points. SET @r=0; UPDATE ranks SET previousRank=rank, rank= @r:= (@r+1) ORDER BY points DESC; The field ...
2
votes
1answer
17 views

Storing prices with price history and different specificity (global, user group, single user) in MySQL database

I need to store prices with their history. A price can have different specificity. It can refer to a single user (most specific), group (less specific) and product price (global - least specific). ...
0
votes
1answer
43 views

Unique clustered index on indexed view fails because of aggregates

I want to create an indexed view similar to this (slightly simplified): Create VIEW dbo._v1 WITH SCHEMABINDING AS SELECT COUNT_BIG(*) as CB ,[ID] ,TITLE] ...
0
votes
0answers
10 views

Would it be a good idea to create a system using MS Access as a front end and MySQL as a backend? [on hold]

I've recently been working on a MS Access project. I had to re structure the DB as almost nothing was normalized and some issues were encountered. After finishing the DB ...
0
votes
0answers
8 views

Oracle 12c 2-node RAC, after first reboot CRS is hanging/stuck on octssd on the second node

My issue is with the Cluster Time Sync Service on the second node of an Oracle 12c RAC 2-node cluster on Oracle Linux. After the first reboot the second node is stuck on the octssd.bin process. I ...
1
vote
0answers
4 views

Generate tables from entities with hibernate

I'm using postgresql with a spring/hibernate to create a multi-tenant application where every company will have its own seperate schema and tables in the database. So when the super administrator ...
2
votes
0answers
9 views

Slow fulltext search for terms with high occurence

I have a table that contains data that is extracted from text documents. The data is stored in a column called CONTENT for which I have created this index using GIN: CREATE INDEX "File_contentIndex" ...
3
votes
0answers
18 views

Mysql suddenly crashing after several months

I'm away on leave and mysql on an EC2 (m3.medium general purpose) based server I have The displeasure of managing has suddenly started crashing. I have very intermittent internet connectivity through ...
1
vote
0answers
11 views

Impact of adjusting Time of Mongodb server?

Using Ubuntu 14.04 and mongodb 2.6.10 I have time difference between a replica machine and primary , my secondary isn't configured with NTP what are the implications of adjusting time on the ...
-3
votes
1answer
47 views

Retrieve result for all the users

I have one query which returns particular user total hours for a month. I want to return for all the users in an org. UserRegistration table contains UserID. My code for particular user is, SELECT ...
0
votes
0answers
10 views

What exactly are secondary members acknowledging in replicasets with MongoDB?

I try to understand the mechanics and behavior of MongoDB's replica-features better. I hope to get some insightful information from someone who is familiar with mongo's internals and behaviour. My aim ...
0
votes
0answers
18 views

List of role permissions including other roles - how can I find out the roles that belong to other roles?

I can see the permissions of a role in a database using the scripts in List all permissions for a given role? However, It does not show me when the role belongs to a another role. For ...
0
votes
2answers
24 views

select where column with a %

How can I select all records with a % in? Goes code below works? SELECT * FROM table WHERE column LIKE '%%%' first and last % for zero, one or more chars second % for the percent skinn If not ...
0
votes
0answers
10 views

db2audit on a table in a db2 database

I have a table in my database from where records are getting archived continuously. We have come across a solution of configuring db2audit. I have the below understanding on this: Describe the ...
1
vote
2answers
49 views

Partition of a table - how to minimize the time offline? How to check if all the statistics were updated?

As you ca see on the picture, I have a table called "tblsapdispatch" that has 55,707,259 records. Last sunday 30-aug-2015 they run a big update on this table, and I can see that the statistics were ...
0
votes
0answers
24 views

How come MySQL LIKE is faster then FULLTEXT?

So, I was trying to optimize my MySQL queries, but found out that i'm actually doing this wrong. I've changed my query from using SELECT * FROM test WHERE tst_title LIKE '1%' To: SELECT * FROM ...
-2
votes
0answers
27 views

How to make a procedure Loops on all Rows [on hold]

Hey there i have created a table as in the attachments ... and i have created a procedure that works on a specified columns of the table to serve this purpose: update score depend on random number R ...
-1
votes
3answers
61 views

Joins in Stored Procedure

Below is my code, which returns billable and non billable total hours for their projects. I want to show in single row, but i am getting two result sets like below. DECLARE @UserName NVARCHAR(50); ...
0
votes
0answers
10 views

postGIS dump size seems strange

I have this table on postGIS 2.1.5 (postgres 9.4.3). A pg_relation_size shows a size of 300MB. However when I try to dump the schema containing this table (and only this table), I end up with a 27GB ...
1
vote
0answers
18 views

Table replication with extra TIMESTAMP column on slave

I have a table on master and same table on slave with an extra column like InsertTime timestamp DEFAULT CURRENT_TIMESTAMP I want to keep record of time when there is update on slave. Replication ...
1
vote
0answers
27 views

Duplicate Same Table for Multiple locations

We have an "appointments" table with following schema. appointments(app_id,.....,app_type,location_id) app_type - type of appointment location_id - keeping the location for multiple location setup. ...
0
votes
1answer
22 views

Importing MySQL tables from other database in live site with mysqldump can cause trouble?

Scenario: I want to replicate MySQL tables from one database to other database. Possible best solution: May be to use MySQL Replication feature. Current solution on what I'm working as workaround ...
3
votes
0answers
66 views

Can't restore SQL Server db from full backup, log processing fails, database in 'restoring' state

I am trying to set up a database for development purposes on my PC's local SQL Server Developer Edition 12.0.2000.8. I've got a full database backup and separate transaction-log-only backup files ...

15 30 50 per page