All Questions
0
votes
0answers
7 views
Is there a good way to select a row where the key represents the lower bound of a range?
I am designing some tables and a number of the tables have as the key a lower and upper bound which never overlap. I want to query by a value that can fall withing any of those ranges. If I keep both ...
2
votes
1answer
13 views
SQL Server many-to-many relationship, row reuse?
Below is your typical many-to-many relationship. Pretend there are 2 tasks that have the exact same Tags. because of foreign key/primary key relationship constraints, there is no way for the rows in ...
0
votes
0answers
12 views
How to remove a table partition
I would like to remove a partition from a table in a SQL Server 2012 database. The table has a primary key but the partition column is not a primary key. I would also like to keep the data structure ...
-2
votes
0answers
17 views
What type of database/hardware is required for 20 million rows?
I am looking to create a database with 20 million rows, 10 columns, and would like to be able to search it very fast. What should I use to create the database and what kind of hardware for this is ...
1
vote
1answer
9 views
How can I split Date column values in Access into 2 columns?
I have a date column that stores values for begining to end date as:
070314-073114
So I need to split it to 2 columns that has the Start Date as 070314 and End Date as 073114, any suggestions?
This ...
0
votes
0answers
6 views
Postgres sync database
I have two postgres databases.
Master = master_database
Slave = database
All initial changes are made to master. Upon admin approval, the version is updated, and I want all changes to be copied ...
0
votes
1answer
4 views
How to activate load balancer in sharded MongoDB
I have a very simple MongoDB database structure. Also I have 7 shards in it (3 of them are replicasets). But we testing DB loading and it seems that load balancing doesn't currently enabled.
On mongos ...
0
votes
0answers
8 views
Select changes in table by date
I have following table schema
name type
id int
key string
count int
date date
url_id id
with example data
id key count date url_id
1 system 100 ...
0
votes
1answer
13 views
Any way to force “garbage collection” in TokuDB?
Playing around with TokuDB I'm finding even after "optimize table" for things such as changing row compression or other DDLs it takes a non deterministic amount of time for freed space to be reflected ...
0
votes
0answers
17 views
How to improve performance joining tables with no primary keys
Given two large tables of ~8,000,000 rows each. They are being joined on substrings of
name
address
zipcode
Naturally, the query is taking a long time. What are the best methods to improve it
0
votes
0answers
15 views
Adding a group of rows in postgresql based on column id
I have a table with a sets of rows such as displayed below:
Qty Equip_ID
21487.92;"Load Center-6"
99272.59;"Load Center-10"
68088.61;"Load Center-11"
21821.5;;"Load Center-6"
102165.2;"Load ...
0
votes
1answer
22 views
Can't create table, but table doesn't exist
I'm using these steps to create a table my_user, that already existed but somehow vanished from my database my_db:
mysql> USE my_db;
mysql> DROP TABLE my_user;
mysql> ERROR 1051 (42S02): ...
0
votes
1answer
14 views
PostgreSQL : select columns inside json_agg
If I have a query like
SELECT a.id, a.name, json_agg(b.*) as "item"
FROM a
JOIN b ON b.item_id = a.id
GROUP BY a.id, a.name;
How can I select the columns in b so I don't have b.item_id in the ...
0
votes
1answer
9 views
Sync MySQL 4.0 table to MySQL 5.6 server every few minutes
I am tasked with getting a copy of a table on a MySQL 4.0 server synced to a completely different database on a MySQL 5.6 server every few minutes for the purposes of having that table available ...
1
vote
2answers
34 views
Deadlock with simple queries in sql server 2008
I have an application that must delete and insert registries from a table, the table is storing the historic registries for an access control and is stored with the datetime for the check in the ...
0
votes
0answers
4 views
Is there any relation between BSON storage for mongoDB and MySQL storage?
I am working on an application where I need to make analysis that what will be the storage size of BSON structure if same data is stored which is stored in MySQL. Basically I am comparing MongoDB and ...
1
vote
1answer
14 views
PostgreSQL seems to ignore RAISE EXCEPTION in a CTE
Using PostgreSQL 9.3 I have been trying to define an assert helper function to check for empty query results and similar things as follows:
CREATE FUNCTION public.assert (
in_assertion boolean,
...
0
votes
0answers
5 views
Risk associated with “master catalog has become out of sync with the warm standby master”
Am I correct to suspect that when a Greenplum system's master servers have entered a state of "master catalog has become out of sync with the warm standby master", we are then running in a state with ...
0
votes
0answers
11 views
Restoring Database tables in wamp [on hold]
Pls, i recently formated my system without exporting my database file from my phpAdmin in wamp server. How can i restore back my data from "C:\wamp\bin\mysql\mysql5.6.17\bin"?
thank you
0
votes
1answer
33 views
When should I NOT set the Maximum Server Memory option in SQL Server?
In SQL Server, I normally set the Maximum Server Memory setting to one of the popular best practices, such as leaving 10% or 4GB, whichever is higher.
...
0
votes
0answers
10 views
How can I check the size of my SELECT query? PostgreSQL
I know how can I check the size of my database, called test:
SELECT pg_database.datname,pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database where datname='test';
Now, I ...
0
votes
1answer
11 views
How do I select the value with SERIAL data type in postgres
I wanna ask how to select coloum that has SERIAL data type.
I already try to do that but the output is like this 'Resource id #3', and not just '3'
I use SERIAL so I dont have to input ID like when ...
0
votes
1answer
13 views
Index Maintenance Plan
At our organisation we are migrating to SQL Server from visual foxpro dbf and hence had no maintenance plans and have no DBA. We have gone through our backup plans and Index maintenance is only index ...
0
votes
0answers
17 views
Two MySQL requests at the same time - Performance issue
I have a MySQL server with many innodb tables. I have a background script that does A LOT a delete/insert with one request : it deletes many millions of rows from table 2, then insert many millions of ...
0
votes
1answer
12 views
Insert pictures
I need to create dictionary with pictures.
I created database of words in mysql
I tried to collect pictures of each word.
How can insert pictures into tables?
0
votes
0answers
16 views
Installing database
I have created database in my system using mysql.I tried to use in one of my friend's system.How can install the database in other system?
0
votes
1answer
19 views
Selecting 3MB (or more/less) data from database server
I installed PostgreSQL Server on my Windows 7 machine. I created database and a simple table, and populated the table. Now I want to connect through the network with my Postgres server and select a ...
0
votes
1answer
15 views
SQL view, how to append results from tableB with the results from tableA
I am using SQL server 2012. I would like to generate a sql view where I got all records from tableA. And below these results I would like to have the results from tableB. There are no relations ...
0
votes
1answer
19 views
SQL Server xp_cmdshell: account's access changed - how to avoid restarting the service?
A T-SQL script is running an xp_cmdshell call to stop a local service through Powershell's Stop-Service, say, like this:
exec xp_cmdshell 'powershell Stop-Service -InputObject (get-Service -Include ...
0
votes
1answer
15 views
Find status of shutdown immediate
I just issued a shutdown immediate command, and it's taking a lot of time. Is there any way, I can find the status of the shutdown task in terms of percentage completed? Or, any kind of status update. ...
0
votes
0answers
14 views
Group by not working in MySQL
I have Dimension table (Dim_Store)with 224 records and fact table with 256 M rows.
If i fire the below query, it gives me only one record, which is absolutely fine.
SELECT s.store_code,
...
0
votes
2answers
19 views
SELECT query with referenced subqueries
How does one reference the currently-grouped by field in a subquery?
Consider a table with the following data:
Client Status Size
1 A 500
1 B 1500
2 ...
0
votes
0answers
9 views
eCommerce product table design - MySQL
I am designing database for an web application, I have designed the product and specification details database as follows,
create table pr_size
(
size_id int not null auto_increment,
...
1
vote
0answers
28 views
Clarify unique constraint and index, cannot grasp the concepts to 100% [duplicate]
When reading about UNIQUE, I understand the concept but when it comes to the practical part of it, I get confused and I'm unsure of what it means.
What I do understand, is that there are two ways to ...
0
votes
0answers
5 views
Mysql / ASP.net Timeout IO error
I have the following MySQL Query that when executed in my aspx page, yields a connection timeout error - the connection timeout is 15 which is the problem but I can not change it - have tried changing ...
0
votes
1answer
17 views
SQL Express 2012 SP1 install still not 11.1
I run the SQL Express 2012 SP1 install and it succeeds. After I have rebooted my computer, I do a
select @@version
But still I only have version 11.0.21600.64. I have tried this on two computers ...
0
votes
0answers
12 views
Garbage DB Objects Cleansing
How do I find in use db objects from all application pages is there any tool or trick I can use, just like we do search in Visual studio for an object in entire solution
1
vote
1answer
19 views
How to create a second socket for mysqld
I would like to create second mysqld instance.
How can I create a second socket file?
I tried copying /var/run/mysqld/mysqld.sock and create an empty file mysqld2.sock but no luck.
1
vote
1answer
17 views
Options to include with mysqldump when taking backup of hybrid databases
I'm planning on taking backups of all MySQL databases on a remote production server. The combined database size is around 2 GB. Most of the tables are InnoDB ~1.8 GB and the rest are MyISAM.
Now I've ...
0
votes
2answers
25 views
How can I mysqldump all databases except the mysql schema?
I want to backup all databases on mysql server.
I want to exclude the mysql schema.
How can I do that ?
0
votes
0answers
10 views
Will Amazon RDS for Postgres be as convenient as using Heroku Postgres?
I'm currently running a Heroku Rails app and our Postgres DB has grown to a data size of 50GB, and our DB cache hit rate is at 93%. We're on the legacy Ronin ($200/month) plan (1.7GB) and probably ...
2
votes
1answer
46 views
Is DBCC SHOWFILESTATS an accurate way to see unused space?
We have a few tables each with near 100 million rows of data. A co-worker has these tables setup with partitions based on a date field.
Our disk space is starting to run low and knowing that ...
0
votes
1answer
10 views
Will my query pick up where it stopped due to connection timeout?
I am doing a rather large query that hits MySQL connection timeout. I know how to change the timeout parameter, but I'm also query from a laptop that can't be left running for long.
The database ...
0
votes
1answer
15 views
Remove all duplicate data in mysql
I want remove all duplicate data from my table. anyone help me.
my table :
biblio
one
one
two
three
three
four
five
i want to get result like this
biblio
two
four
five
0
votes
1answer
19 views
Will removing a foreign key constraint affect performance?
I have a units table and a reports table. A unit has many reports. So reports table has a foreign key unit_id which corresponds to the id of the unit. Hence, there is a foreign key constraint in ...
0
votes
0answers
9 views
Commenting in Greenplum gpload YML script
I would like to put some "change history" comments in gpload YML scripts. Is that possible?
0
votes
0answers
10 views
mysql restoration suddenly became slow
Recently I reinstalled couple of servers from Ubuntu to RHEL. I was having problems in restoring the mysql database from the dump file. I modified the below parameters in the /etc/my.cnf file.
...
0
votes
0answers
10 views
MySQL remote connection: Public vs. private IP address
I just went through the obligatory pain of getting MySQL to accept a remote login. Yes, I had to create a user of the form ''@'%', and I did so. Yes, I had to GRANT ALL ON . to my new '@%' user and ...
0
votes
0answers
9 views
Create multiple columns after summing a single column
I have a single MySQL table, which includes company names and orders covering a 10 year time span. I want to create a query which summarizes the totals by company and creates a column with the totals ...
0
votes
1answer
8 views
compare file-based systems and a relational database
I don't know the exact difference of both can you please compare file-based systems and a
relational database?