0
votes
0answers
2 views

Is it meaningful to ask which of MySQL or PostgreSQL is a better choice for long term (horizontal) scalability?

It is well recognized that at very large scale (tera to peta and over bytes of data), column stores or something specifically custom-built are the default choices. What is the best off-the-shelf SQL ...
0
votes
0answers
4 views

Help understanding Amazon RDS performance scaling

I need some help understanding how I should scale my Amazon RDS instance. Where is the actual bootleneck? My issue right now is that the larger the data set I need to return the longer the query time ...
2
votes
0answers
18 views

Upgrading SQL database resulting error

I've currently updated my SQL environment and moved everything over to a new database. This includes the BizTalk service we are using. However, when I retired my old database, I started to received ...
1
vote
0answers
4 views

least privilege MongoDB monitoring user (no access to customer data)

We use A Nagios plugin to check the status of MongoDB. Howto create a user with least privileges for this plugin? Admin acess would be a security vulnerability. I found the built in role ...
0
votes
1answer
15 views

Where does the logins users are stored in the SQL server “in which data base “ [duplicate]

Where does the logins users are stored in the SQL server “in which data base “ In some softwares that requires the admin to create users/password for his users such as ArcGIS server the logins ...
0
votes
0answers
11 views

Foreign Key Constraint over two tables

I am trying to put the following entity-model into practice: We have a list of Payments, each Payment belongs to a certain store and is of a certain payment type (e.g. 10€ maintenance cost in ...
0
votes
0answers
5 views

MongoDB document delete and fragmentation

I've a MongoDB collection that works like a queue: new documents are insert and old documents (after 60days) are removed. I can see a rapid grown of the datafile size, too rapid. I can be reasonable ...
0
votes
0answers
6 views

I have to replace file but an error

Try Dim Save As String 'Save file CeateCSV(GridView1.SelectedRow.Cells(1).Text, GridView1.SelectedRow.Cells(1).Text) If Left(GridView1.SelectedRow.Cells(1).Text, 2) = "FL" ...
2
votes
0answers
9 views

Replication stops with GTID_NEXT error after creation/drop of memory table in mysql5.6

We have recently upgraded to mysql5.6.25 from mysql5.5.x/mysql5.1.x on our mysql-cluster. Below is a brief snapshot of our architecture. Since we have upgraded and enabled gtid-mode we have ...
2
votes
1answer
16 views

How to generate a unique barcode without using identity or sequence in SQL2012

We're currently building an application where customers need to have 1 unique barcode. Each time a new customer has been added to the system, a new unique barcode needs to be generated for that ...
0
votes
0answers
9 views

set sql_mode “blank” after upgrade Mysql to 5.6

after upgrade mySQL from 5.5 to 5.6 some our app face to problem and need set sql_mode to blank to solve this issue. I add sql_mode = '' to my.cnf but not affect mysql setting. Thanks to guide.
0
votes
0answers
7 views

MySQL InnoDB data restore using 3 files

I am able to restore MySQL table data along with structure with indexes (InnoDB Engine) using 3 files. MyTable.frm, MyTable.ibd and ibdata1. Can any body confirm, will these 3 files suffice to ...
0
votes
0answers
12 views

how to select the date from the tables?

I AM HAVING TABLE CSS533 I AM HAVING TABLE CSSSERV I want to select SERV_ACCT_NUM and BID_TYPE_CODE from CSS533 and SC_START_DATE and SC_END_DATE from CSSSERV where SERV_ACCNT_NUM for both ...
0
votes
0answers
6 views

Checksum mis-match found on a table while restoring data using mysqlbackup

We are trying to restore MySQL data (which was backed up using a single image) using the mysqlbackup utility. But, all of a sudden, it is showing checksum mis-match for table t1 Our questions ...
2
votes
0answers
17 views

Recursive BOM (Bill Of Material) type query

I have what I've been told is a Bill Of Material type query - which requires a 'recursive' query. I've never heard of such a thing - and was hoping to get some help. My schema stores asset / ...
2
votes
0answers
10 views

Efficiently computing aggregate functions over subqueries with incremental data

I have a PostgreSQL database containing a large number of orders. As the orders are processed, scan_events are triggered and stored, with multiple events per order. Scan events have a boolean ...
0
votes
1answer
20 views

What is the best way to find out the sum of a field from a table?

I am making a accounting software. I have a table debit_credit that contains double entry accounting data.Table is: debit_credit_id | tran_id | ledger_head_id | debit | credit | dr_cr | commission | ...
-3
votes
0answers
20 views

I want to create a trigger from parameter of procedure

CREATE PROC procCreateTrgSelectTBL (@tableName VARCHAR(50)) AS BEGIN DECLARE @sql NVARCHAR(MAX), @statement NVARCHAR(MAX) SET @statement = ' CREATE ...
0
votes
1answer
15 views

Tuning postgresql.conf when benchmark

Description: We build a new database server Enterprisedb v9.3 (PostgreSQL commercial), so we use JMX to benchmark it with 1000 users. Here our detailed information: Operating System: Centos 6 x64 ...
0
votes
0answers
27 views

how to select from the two tables?

I am having table 1: I am having table 2 I want to select PRIMARY_ENTRY_NUM from table1 where TABLE_ABBRV_CODE FOR BOTH TABLES SHOULD BE SACT AND TABLE_ENTRY_NUM for both tables should be same and ...
0
votes
0answers
15 views

SQL Login import [on hold]

I am attempting to create a SQL login for a connection to my database. Background: I took a database from server 2005 and upgraded it on SQL Server 2008 and then moved it to 2014. Its original ...
0
votes
1answer
14 views

Can't enable MySQL 5.6 Query Cache

I'm trying to enable MySQL Query Cache on Ubuntu 15.04 with MySQL 5.6.25 I've added this to end end of /etc/mysql/my.cnf and /etc/mysql/conf.d/mysql.cnf: query_cache_type = 1 query_cache_size = ...
2
votes
1answer
28 views

Does Resource Governor help protect page life expectancy?

I have several large tables that I need to copy into partitioned copies on a transactional database. I am worried about the hit that this will cause to performance of my production applications. In ...
-3
votes
1answer
33 views

Finding uniqe values from one table and calulating total number from another table that have unique values from first table [on hold]

I stuck on calculating values Name of table: dabase_123 Demo of table: program | quantity windows xp--------30 windows xp--------30 windows xp--------30 linux ubuntu -------80 I can filter ...
2
votes
1answer
14 views

Sharding Mongodb while limiting the number of documents to be migrated

I have little experience working with databases, but at my work i was tasked to deploy a sharded Mongodb cluster and the constrain on the shard is: database with multiple colections, 7 collections ...
1
vote
2answers
35 views

Getting results without using IN

Oracle has a limit on the arguments in the IN statement of 1000, I believe, is there a way around this? If I had a statement similar to this (with 1000 ids or more): SELECT COUNT(*) FROM "VERSION" ...
2
votes
1answer
73 views

Can I exchange partition between two table with partition with same name?

I am trying to restore one partition from a backup table. Both tables have partitions with the same name. My goal is to grab the data from the backup table partition x and put it in original table ...
1
vote
2answers
26 views

ORACLE_HOME / ORACLE_SID variable - why do we need to export them ?

I am not sure if this is a bash / shell question or oracle question. I am on linux and oracle 11g. I have always export my ORACLE_HOME and ORACLE_SID variable and e.g. using invoking sqlplus is no ...
0
votes
0answers
15 views

MySQL Connector C++ bad_alloc thrown? [migrated]

I'm trying to write to a database from C++, but every time I attempt to execute() the command, I get a bad_alloc error. I know that the string is correct, as I have used the same exact string with the ...
1
vote
2answers
22 views

Apply limit and conditions per grouped data

I am building an api endpoint to send statistics data that then is going to be plotted on a graph. The hardest part is being the query I need to execute. To sum up I want the first n most sold ...
1
vote
1answer
28 views

Count childs of parent with sql or save in column?

In postgres I have a threaded setup where parent id has many childs and childs can have childs. What is the most efficient way to get the count with a sql statement similar to this: WITH RECURSIVE ...
-1
votes
1answer
23 views

How to pass input parameter in stored procedure calling from single command line [on hold]

I know how to execute stored procedure by single command line echo execute some_procedure | sqlplus username/password@databasename But I am stuck how to pass IN parameter in procedure, actually My ...
0
votes
1answer
16 views

how can I count by week, month, and YTD with postgres?

under PGSQL 9.3 I am trying to run a query to summarize some data from table a: | Entry date-Date | Customer ID-charvar | received-Boolean | Processed-Boolean | finalized-Boolean | billed-Date | I ...
2
votes
0answers
27 views

Understanding `dbcc showcontig` Record Size

I am comparing two tables. They are: CREATE TABLE Table1( Column1 [bigint] NOT NULL, Column2 [VARBINARY](max) NULL, Column3 [int] NULL, Column4 [DATETIME] NULL, Column5 [INT] ...
0
votes
1answer
12 views

Long full scan hasn't returned but session is gone from V$SESSION

I have a query on a big table purposefully hinted with /*+ FULL() */ and uses partition pruning, and for a while the scans for each partition can be seen in V$SESSION_LONGOPS. After a while no more ...
2
votes
2answers
38 views

How do I get Brent Ozar's sp_BlitzIndex to run on Azure?

I downloaded the SQL Server First Aid Kit from Brent Ozar's website. When I tried to run the sp_BlitzIndex script against my master database via Microsoft Sql Server Management Studio while logged in ...
3
votes
1answer
21 views

Finding when a currently running Extended Events session started?

For old-school traces, I can look in sys.traces or the SQL Server log to find when a trace was started. Is there something similar for Extended Events? I came across this blog entry about using a DDL ...
3
votes
1answer
27 views

What do the shared buffers metrics for various types of index scans represent?

TL;DR: When an "EXPLAIN (BUFFERS)" shows an "Index Scan", it does not show the number of pages needed to be read from the index. Is it just omitting that number, or does it actually not read pages ...
2
votes
1answer
17 views

Postgres 9.2 - postgres - FATAL: XX000: relation mapping file “global/pg_filenode.map” contains incorrect checksum

We have a ~400GB Postgres database (v9.2.6) (running on CentOS 6.5) that had a problem with free space and with every command (ls, pwd etc) we were seeing a segmentation fault error. We were able to ...
0
votes
3answers
53 views

Major performance difference from a small change in query

I have a query written out to search a WordPress database for any post ids that match the keyword search to post content, title, author, or associated company. The company portion of the query is ...
0
votes
1answer
13 views

When to choose an attribute vs. a new dimension?

I am fully aware of what is a fact, attribute and dimension. However, I'm quite confused to which traits I should choose for dimensions vs attributes of that dimension. For instance, I'm building a ...
0
votes
1answer
17 views

PostgreSQL - Who or what is the “PUBLIC” role?

I was looking at information_schema.role_table_grants when I saw public in grantee column, then I've checked at information_schema.enabled_roles but this role_name does not exist. => Who or what is ...
0
votes
0answers
7 views

A query to know RDS instance name in Amazon RDS for Postgres

Do you know a way to fetch the RDS instance name by a query run against a RDS-powered PostgreSQL database in Amazon? Something similar to: curl http://169.254.169.254/latest/meta-data/ami-id in ...
0
votes
1answer
10 views

Create postgres schema in db with multi user in AUTHORIZATION

Is it possible to create a schema that is owned or accessible by more than one user in the same database? I was reading postgres create schema documentation and postgres alter schema documentation ...
2
votes
1answer
28 views

SQL Server 2012 - Disable Job On Linked Server

I have a job on server B, which is linked to server A. Is it possible to disable a job that exists on server B in the context of server A? I have tried the following command from server A and receive ...
0
votes
0answers
9 views

MongoDB: Server sockets closed after a few minutes

I am working with multiple AWS intances connected to the same mongo database (inside Compose.io Elastic deployment) but I keep getting the error server <url>:<port> sockets closed after a ...
2
votes
2answers
131 views

List all databases of a certain user ( SQL Server 2008 R2 )

I'm really looking for this answer for some time. I bet there is a post here but, I really can't find ( even on google ). I think it's a simple task. I want to list all databases for a specific ...
1
vote
0answers
27 views

How to represent multiple unique constraints across hierarchical tables?

My (shortened) table definition is: CREATE TABLE bus ( id integer NOT NULL PRIMARY KEY, name character varying NOT NULL CHECK (name<>'') ); CREATE TABLE network_node ( id ...
2
votes
0answers
29 views

“could not write to log file, Bad file descriptor” error when working with huge table

I'm having a big problem with a PostreSQL database. Whenever I do something with a huge table (over 9 million rows) the whole postgres process crashes with the following entries in the log file: ...
2
votes
2answers
189 views

Why does PK constraint require a separate index when I already have a suitable unique clustered index?

This is part of table definition from here: CREATE TABLE [dbo].[JobItems] ( [ItemId] UNIQUEIDENTIFIER NOT NULL, -- lots of other columns CONSTRAINT [PrimaryKey_GUID_HERE] PRIMARY KEY ...

15 30 50 per page