0
votes
0answers
3 views

Optimization of variables in my.cnf (mysql) for Drupal

I just get a Dedicated Server running UBUNTU and I need to optimize the variables in my.cnf for Drupal 7. I understand that this is tailed job. Then Is there any tool to help me to do this? I am a ...
-1
votes
0answers
3 views

nested set model with multiple trees in multiple tables

I have develop a MLM (multi-level marketing) system and so use nested set model in hierarchy users. A tree in MLM may have over 1,000,000 rows. It also should have multiple tables where each table is ...
1
vote
0answers
5 views

PAGEIOLATCH_SH and WRITELOG waits

We have a slow overnight process which I was asked to look at with the top waits being PAGEIOLATCH_SH and WRITELOG I have been collecting information from sys.dm_io_virtual_file_stats and can see ...
0
votes
0answers
8 views

DB select query performance when queried by partial key of primary key

My primary key is composite - {a,b}. Will there be any performance gain if I query only {a} or DB is going to scan the whole table as there is no index only on {a}. How much storage overhead would be, ...
0
votes
0answers
3 views

What will happen if the primary shard for a mongodb database is down?

Well as I understand each database has it's primary shard, which is mostly the first shard added to mongodb cluster. And we know that spliter will not split chunks until the chanksize is less then max ...
0
votes
0answers
10 views

Error: At least one parameter contained a type that was not supported

In my case, there are two SQL stored procedures EnqueueMessage and ReadMessage. EnqueueMessage will save details and ReadMessage is for getting the messageData using Id. I have enqueued the message ...
0
votes
0answers
8 views

How to split delimited text in a column, fetch respective ID from another table and store in a new column [on hold]

I have a column i.e. p_author in sql server table named as sub_aminer_paper containing values of single or multiple authors having data type text separated by semi-colons i.e. ; Now I have to assign ...
0
votes
0answers
9 views

Best database design for website ranking

I am working on a project in which I need to rank websites in two way - Global rank and their rank in a particular country. There are various factors based on which both are calculated. There are ~200 ...
1
vote
1answer
17 views

Check Constraint across date range and foreign key

I have a table created as: Primary Key Foreign Key DateStart DateEnd The ForeignKey can appear many times in the table as long as there is a value in the EndDate. But there should only ever be one ...
2
votes
0answers
13 views

How to map a drive in a SQL Server script

I am trying to execute below script to Network a Drive use master go exec sp_configure 'show advanced options', 1; go reconfigure go exec sp_configure 'xp_cmdshell',1; go reconfigure go EXEC ...
0
votes
0answers
6 views

Rename Availability Group and AG script

I have two questions for you guys. I really appreciate your help. 1.- Is there a way to rename an Availability Group? 2.- Is there a way to get the T-SQL statements in order to re create a ...
0
votes
0answers
18 views

would you help me understand errors and bad exercise containing in the query?

A customer called technical support for a DBMS, saying that the DBMS had a severe bug and was crashing the operating system. On investigation, it was found that the ‘crash’ always happened when a ...
1
vote
1answer
9 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; ...
3
votes
1answer
15 views

Do fixed-width rows improve PostgreSQL read performance?

I have a table articles: Table "articles" Column | Type | Modifiers | ...
1
vote
2answers
24 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 ...
3
votes
2answers
42 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
30 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" ...
4
votes
0answers
41 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
1answer
18 views

Why am I getting error 1064 when creating a table? [duplicate]

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
1answer
27 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 ...
5
votes
1answer
222 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 ...
3
votes
2answers
42 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
28 views

INSERT from SELECT using a CURSOR

I have a table that looks like this: +====================================================+ | aid | uid | eid | name | dob | paid | ...
3
votes
2answers
26 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
10 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
20 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
27 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
6answers
549 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 ...
1
vote
0answers
10 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
37 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
58 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
23 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 ...
1
vote
2answers
21 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
32 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
2answers
14 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 ...
1
vote
0answers
9 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
12 views

MongoDb performance with large data [on hold]

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
17 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
19 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 ...
3
votes
1answer
20 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
44 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
12 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
9 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
10 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
1answer
26 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
14 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
48 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 ...

15 30 50 per page