1
vote
0answers
24 views

Table already exists error when trying to import sql file

I am trying to upload a backup sql file through phpMyAdmin. I create the empty db with the same db name as in my import file in phpMyAdmin then use the import function selected from within this empty ...
2
votes
1answer
50 views

Why write ahead logs in PostgreSQL are generated every second

PostgreSQL version 9.2 generates write ahead log (WAL) every second i.e. 60 WALs are generated in one minute. Is it possible to make them occur less frequently? Is it possible to increase the WAL ...
0
votes
1answer
25 views

one to zero or one relation strategy

For a 1 - > 0..1 relationship (Let's say a product can have none or 1 product_price) What are the differences between this 2 scenarios. When one should be encoraged over the other or is anyone bad ...
0
votes
1answer
62 views

What are the best ways to thrash SQL Server?

I have an issue where a software driven replication system will fail to fully replicate when the main DB is under heavy load. For example if we execute a sproc 500 times, maybe 450 will actually ...
1
vote
1answer
55 views
+50

Replication from EC2 Master to RDS Slave - Connecting to master

I am migrating my company's database from an EC2 instance to an RDS instance. I have already migrated a snapshot of data and am now trying to set up replication to get the data that has been added ...
1
vote
1answer
38 views

Increased performance from single statement, multiple row inserts?

I'm currently obsessing over bulk inserts via prepared statements with libpqxx. I am far from a database expert and even further when it comes to Postgres, but just thinking superficially, it doesn't ...
0
votes
2answers
67 views

Why is MySQL not using the index with the higher cardinality?

I have an index called source with cardinality of 1122 and a second index called state with cardinality of 22. MySQL keeps using the state index when when query SELECT C1 FROM tbl WHERE source = 'x' ...
0
votes
0answers
72 views

Row_Number() not working with OVER PARTITION BY

I have a query that I am "rolling up values". Lets say I have two rows that are the "same", save for one field: [CNumber] [PNumber] [date] [FullName] [Type] [P] [S] ...
0
votes
1answer
20 views

How to Implement a Retry Feature in SSIS 2012 When a Database Connection Fails?

We have an SSIS 2012 package that supports our internal analytics reporting database by extracting data from an external database server. Last night, for the first time, the package failed due to a ...
0
votes
0answers
21 views

SQL Server DTC: is it possible to automatically replicate data that is created on Oracle DB?

I have a SQL server with a table that is spec'd exactly like a table in an Oracle database. What I would like to do is automatically copy the data from the Oracle table to the SQL server table... Is ...
0
votes
0answers
14 views

MS Access: ODBC Err 3146 - Timeout related?

I have an AccessDB that queries that appears to function as expected under light loading (i.e., 1-2 users), no errors, SQL Server returns the desired results. We tried to test using 8 concurrent ...
0
votes
0answers
13 views

What is the best way to backup and restore a subset of data within a subset of tables in a sql server database?

I need to be able to periodically backup & restore a subset of data in a sql server database. I only want to backup data in the tables which contain a specific column name - column1 (for example) ...
1
vote
0answers
18 views

Basic Design Question about one to many in a table

Sorry for the basic question but I am new to all of this! Say I have a table named Runs, and each table has Run: id (primary_key) data (String - path to a data file) status timestamp ... ...
2
votes
1answer
46 views

Making a recursive CTE like query, but for many records

I have a table with a hierarchy ( with a recursive parentID column), for one record, I know how to get the last parent record, with the following code : declare @Id integer ;WITH CTE AS ( SELECT ...
0
votes
1answer
28 views

PostgreSQL extending UPDATE query

I have the following update query to populate a table storing user stats users: int (pk) user_id date last_visit int (fk) local_site sites: int (pk) site_id site_stats: int (fk) site_id ...
1
vote
0answers
15 views

MULTIPLE INSERT VALUES with INSERT into another table

here a scenario to have a more clear picture. The DB is MySQL. I've 2 tables events and *event_users* : EVENTS id int type int date date time time ... EVENT_USERS event_id ...
5
votes
1answer
73 views

SMS Suggesting covering all columns in an index?

I'm still a bit newer to indexes and database works, so I may very well be missing something obvious. SMS suggested adding a covered index to one of my tables that Indexes on the column I believe ...
4
votes
1answer
41 views

Reference assembly in sqlproj not being deployed to server

I have a Visual Studio 2013 Database Project which takes a modified version of fastJSON as a reference. I selected Generate DDL in the reference properties as shown in this screenshot: And in the ...
2
votes
1answer
54 views

Getting Visual Studio to deploy a UDF to Return NVARCHAR(MAX)

I have a SQLCLR stored procedure with the following signature in Visual Studio 2013: [SqlFunction(DataAccess = DataAccessKind.Read, SystemDataAccess = SystemDataAccessKind.Read)] public static ...
3
votes
0answers
27 views

Is PostgreSQL or ElasticSearch/Solr the right tool for this kind of query?

Here is an example of the current PostgreSQL query: SELECT a.*, a.al_location <-> '(someLon, someLat)' AS d FROM al_app.al_activity AS a WHERE to_tsvector('simple', a.al_keywords) @@ ...
1
vote
0answers
40 views

RETURNING syntax with multiple columns

Again, another question related to the answer of the one there: Insert with OUTPUT correlated to sub query table So I ended up with this query, written for SQL Server: CREATE TABLE tempIDs ( ...
0
votes
1answer
41 views

Make Oracle backup files available for duplicate

I have a Red Hat Enterprise Linux server with Oracle 10.2.0.5 and a database on it (SID is TNATEST). I have a remote CentOS server with Oracle 10.2.0.5 on it that I want to duplicate TNATEST to. The ...
-1
votes
0answers
18 views

MySQL indexing types? [closed]

i am newbie for php and mysql developement still don't make any indexing because don't have idea about that. how to use the mysql indexing. mostly used indexing method is what?
1
vote
0answers
48 views

Best database for fast read all in one table

I currently have a large database in SQLite that I was using for rapid-prototyping for a software I am working on. Now that I am planning to move it to another database that should give better ...
0
votes
2answers
40 views

MongoDB Synchronizing multiple Shards

I've got the following layout Picture Cluster RZ West is my first data center A and RZ Ost my second data center B. As you can see one secondary database of each cluster is available in the other ...
-3
votes
1answer
33 views

How long will it take to import 28 millions rows in a MyISAM table? [closed]

Someone has idea how long time it will take to import? I hear something like 40k each minute? Thanks.
0
votes
1answer
73 views

Sort Totals By Months

I need to show the count of all rows grouped by month and then pivot it Appreciate an easy solution for that Or alternatively if someone can help me fix this I've used dynamic pivot query DECLARE ...
0
votes
1answer
20 views

Create a certificate with a private key

Reading this answer I have a question about it: How can I create a certificate with a private key in my app database?
1
vote
1answer
37 views

Select query for returning different data based on creation time

I have a view, which will Select data from table reports the select will filter the data based on multiple dates. reports table: id, key_id, position, created_at My select: pr.key_id, ...
0
votes
0answers
14 views

Postgresql not working: error

My Postgres was working fine on my ubuntu 12.10 before i installed postgres-xc and execute a command initdb for changing encoding. After that it started showing error like: psql: could not ...
0
votes
0answers
14 views

#2002 Cannot log in to the MySQL server / Connection for controluser as defined in your configuration failed

I use PHP/MySQL in Ubuntu 13. To reduce the size of ibdata1, i followed this post What is the best way to reduce the size of ibdata in mysql? and make necessary changes as told in the answer. I did ...
-3
votes
0answers
30 views

Best suited combination of Oracle, JDK & OJDBC

Please specify Which JDBC drivers support which versions of Oracle database? Or more closely which Oracle JDBC drivers can 'talk to Oracle 10gXE RDBMS? and what version of JDK is recommended for the ...
-3
votes
0answers
56 views

Fastest way to Restore 50TB DB [closed]

I am trying to find out if there other ideas as what the fastest way is to restore a 50TB DB.
-2
votes
1answer
25 views

How does InnoDB store tables in ibdata file? [closed]

There are two tables and their default engine is InnoDB. I want know the following What's inside the ibdata file ? How does InnoDB store these two tables ?
2
votes
2answers
577 views

“Cannot insert the value NULL”, but there is no NULL values!

This question follows the answer of my other question there: Insert with OUTPUT correlated to sub query table The Person.LastName column has a NOT NULL constraint. When I execute this code: CREATE ...
0
votes
0answers
15 views

Oracle Historical Session Information

I want to know the view or query which provides the total number of active and non-active session for a specific snapshot. Currently I am using the below query. SELECT INSTANCE_NUMBER, count(*)*10 ...
1
vote
1answer
26 views

Drop permission from a dbowner

How can we remove the drop permission from a user or a role like dbowner? Want to restrict the dbowner from dropping the database.
0
votes
0answers
25 views

Extracting node names by looping through xml in Oracle 10G Plsql

I have an XML that looks like below, <email_details> <VENDOR_ID>73</VENDOR_ID> <RGP_NUMBER>1234</RGP_NUMBER> ..... ..... (any number of ...
0
votes
0answers
31 views

Retrieve result set with proportion of some column value

I have a table called PORTFOLIOS in which I have PORTFOLIO_ID, PORTFOLIO_NAME and SCORING_RULE columns. The SCORING_RULE column can have two different values (like double_scoring or single_scoring). ...
0
votes
2answers
54 views

why does mysql query running slower on server?

select glpi_tracking.id AS gi, glpi_tracking.date AS gdate, glpi_tracking.closedate AS cdate, glpi_tracking.contents AS gc, glpi_followups.tracking AS gft, glpi_followups.date ...
1
vote
3answers
16 views

How can I enter Mongo as a superuser or reset users?

I'm was playing around with permissions and locked myself out of Mongo database. I'm pretty sure I did this by trying to explicitly add access to a database but instead I overwrote only allowing ...
1
vote
2answers
23 views

Large MySQL table that need to index some fields?

I would like to know some hints about how to indexing some fields of a MySQL Table that has about 28 millions of rows. Maybe i could recreate the table indexing it properly then import these rows? ...
1
vote
1answer
48 views

Modeling a db that has products: What are the good practices/solutions? How to treat grammar variations in the words?

The problem is: A Company belongs to a sector. A Company produces products. A Sector contains products. A Product belongs to sectors. Three entities: Company, Sector and Product. And it's a ...
3
votes
3answers
49 views

PostgreSQL 9.0 how to reclaim disk space after delete without rebuilding table?

Our PostgreSQL 9.0 Windows production server is running low on space. In our 100GB database, we have a large table containing TOASTed binary data. We have deleted some rows and need to return the ...
0
votes
1answer
25 views

Is it possible (or good practice) to register data upon Deletion of a record? What would be a better solution?

The problem is the following. A company has one or more representatives (a person who speaks on behalf of the company). When a representative is deleted, it's desired to keep it in an list called ...
3
votes
1answer
21 views

Is it possible to remove useless GRANTS in MySQL

I'm using pt-show-grants to create all my GRANTS on a new server but there's lots of old GRANTS that refer to tables that doesn't exist anymore so I get errors when I try to apply the SQL file on the ...
0
votes
1answer
18 views

Should I create a new instance of amazon rds or just a new schema inside of it?

I'm fairly new to Amazon Web Services and one of my customers asked me to install several things for them on EC2. I would normally use the same box as webserver and database server, mainly for ...
1
vote
2answers
62 views

Why does MySQL slow down in loading data?

We have a really large file (26GB) that we need to upload to MySQL. In order to do so we split it into nine 3GB files. What's confusing is that the first file took only 2 minutes to load, whereas the ...
0
votes
1answer
37 views

MongoDB Document size too large

I'm having trouble with my MongoDB Replica Set. I'm connecting to the server and using the database fine from two servers but on another server I'm getting the following error: ...
7
votes
1answer
159 views

Deadlock when update different rows with non-clustered index

I'm solving a deadlocking issue while I noticed the lock behavior is different when I use clustered and non-clustered index on the id field. The deadlock issue seems to be solved if clusted index or ...

15 30 50 per page