3
votes
2answers
122 views

Deciding when to extend to child tables

I have a table of entities. For example purposes, lets call them Vehicles: Car, Boat, Motercycle, etc. I'd ideally like to place all entities in a single Vehicles table because a lot of related ...
0
votes
1answer
36 views

MySQL Database inside a VM on a high availablity cluster

I'm looking to do an infrastructure overhaul.Currently I have a ton of small databases scattered amongst our assets and I wish to consolidate them. Is consolidating all databases to 1 tuned database ...
0
votes
1answer
74 views

Would it make security sense to split up tables into different databases and or servers?

What I am asking is would it be more secure if I had a customer table in one database server and the transactional data in another database server? This way if the database is compromised they are ...
1
vote
1answer
186 views

Need to optimize simple SELECT query for InnoDB table with 2million rows

I'd like to make this query the fastest possible, since it's called really often. SELECT login_events.id FROM login_events WHERE ( DATE(created_at) >= DATE(CURRENT_DATE) AND person_id = 1 ) ...
1
vote
1answer
517 views

Postgres - Optimizing an view dependent on an aggregate function?

I have a table of about 15 million records. Whenever information about a specific charge_id is changed, a new row is added with the current timestamp and the changes. This results in multiple rows ...
3
votes
1answer
4k views

How to optimize InnoDB tables in MySQL

I’ve been researching how to optimize only fragmented tables in MySQL and reviewed this post on optimizing tables. It basically performs a query against the information_schema database for any table ...
0
votes
1answer
158 views

High Global Lock % on Mongodb

I've just started using Mongodb v2.4.8 and the global lock % averages 80% which seems rather high to me. The CPU usage is around 120% on a 2 core, 2GB RAM, SSD VPS running Ubuntu 12.04 64bit. iotop ...
3
votes
1answer
148 views

Will a change from MyISAM to InnoDB require SQL query changes in MySQL?

I am planning to change some large MyISAM tables in my MySQL database into InnoDB. This is because I am having performance problems where large and complex updates (updating a few million rows in one ...
0
votes
1answer
303 views

TEMPDB Round Robin is not working!! It is filled up

I have a 16 Core CPU processor and I have created 8 tempdb datafiles with initial size as 2,000 MB with 10% growth restricted to 10,000 MB. The log file is unrestricted and it is in simple recovery ...
0
votes
1answer
500 views

Views for XML with attributes using XMlTable

I created an XMLType table CREATE TABLE PERSON OF XMLType XMLTYPE store AS OBJECT RELATIONAL XMLSCHEMA "PERSON.XSD" ELEMENT "root"; The XML is - <root> <Person empid="1" empname="Joe" ...
1
vote
1answer
142 views

how to prevent dropping sysadmin user by another user in sql server

I have a legacy application installed on my server which has configured to work only with one user "sa" and there is time bomb like script written inside this application which whenever it finds ...
-1
votes
2answers
192 views

What database should I use to create a webmail service like gmail? [closed]

I planned to use python for my frontend with django framework. But for backend, I have no idea which database I should use. Since it involves plenty of reads and writes can someone point me in the ...
0
votes
2answers
317 views

SQL Server 2000 - How to find unused indexes

In SQL Server 2000 - how can we find unused indexes, so that we can drop them.] I have scripts for 2008 but don't know how to do it in SQL Server 2000. Please help. Regards
1
vote
1answer
118 views

MySQL: Is it possible to have an IF subquery?

I'm attempting to run a subquery inside of an if statement used in the SELECT, but I'm getting an error. I've never needed to do something similar before so I've never tried this until now. Here is ...
2
votes
1answer
102 views

Make View Supersede Table in Same Database?

For testing purposes we have a sanitized copy of our production database in our test world. Because of the way it is sanitized, we now have empty fields where encrypted data previously existed. We ...
0
votes
1answer
96 views

Is it possible to optimize this query? Or any recommendations to speed it up?

After looking at my mysql slow log file I see that almost every entry there is related to this query: SELECT n.nid AS nid, AVG(v.value) AS rating FROM node n LEFT OUTER JOIN votingapi_vote ...
0
votes
1answer
89 views

Get all items from list table which don't have a successful log entry for 'sent' in log table

How might one retrieve items that when joined either don't have a specific field (sent), or if they do have that field (sent) then they have an additional field (failure_reason) as well for every sent ...
0
votes
1answer
165 views

Kerne module for Oracle 11gR2 RAC on Linux

As per Oracle, it requires three Linux packages to run ASMLib: oracleasm - kernel module oracleasmlib-2.0 - ASMLib libraries oracleasm-support-2.0 - Admin for ASMLib This library versions are OS ...
6
votes
1answer
565 views

Better to use a RANGE RIGHT or RANGE LEFT Partition Scheme

I'd like to know if it is better to use a RANGE RIGHT partition scheme or a RANGE LEFT partition scheme? Is one of these options by default a better choice, or is it heavily dependent on the actual ...
0
votes
2answers
596 views

Getting table definitions on the command line in MySQL [closed]

I am new to MySQL. I am trying to get table definitions from the database server (4.0.26). I tried below steps to get information, running cmd as an administrator: c:\> cd mysql\bin\ ...
3
votes
1answer
2k views

PostgreSQL list of integers separated by comma or integer array for performance?

As per subject, I have a field which is varchar in which i store some numbers separated by commas. The list grows and shrinks based on clients choices. I then use it in queries to check if a ...
0
votes
1answer
65 views

Few Insert queries rollbacked due to system crash

Well, this problem occured to me first time. Yesterday, one of our mysql system server crashed and when it restarted last few inserts were completely rollbacked. I am sure that they were proper ...
2
votes
2answers
1k views

Deploy SQL Server Backup Maintenance Plan in multi-tenant environment

We have a multi-tenant environment in which I've been trying to deploy a standardised maintenance plan across all servers. I've been running into issues importing the maintenance plan properly, as ...
1
vote
4answers
865 views

SQL Server 2012 - where is the table in dbo? [closed]

I am trying to insert something into the dbo.Documents table. After the query is run, I can't find the Documents under the TSQL2012 database. I created TSQL2012 for exercise purpose. I couldn't ...
2
votes
3answers
93 views

MS SQL Server instance name

Quick question guys! Will there be any issues if I use the default instance (MSSQLSERVER) for both test and production environments? They are on separate physical servers. I'm using MS SQL Server ...
-2
votes
2answers
273 views

SQL Server 2012 - Stopword Error [closed]

I am doing an exercise in Microsoft 70-461 certification book (written by Itzik Ben-Gan) In chapter 6-Query Full text data. I run the following query to create a stopword list. The system showed me ...
2
votes
2answers
3k views

How to send an alert based on SQL Query results

I currently have a maintenance plan in place that does a backup, re-indexing, etc. If a task fails, it sends me an email alert. I would like to add a "T-SQL Statement Task" that will execute a query ...
1
vote
2answers
130 views

Indexes slowing Insertions(Can't use Explain Insert to Analyse)

I have a MySQL database, I am parsing files from a log and inputting it inside. So far including a simple 4MB file in the database could take me about 4 minutes to insert ! and i have about 10,000 ...
0
votes
1answer
867 views

tables for different sources of payments

Selling software products. I have a table "licences". Each software licences is created due to a payment. I am creating tables to accept payments from different sources (e.g. manual or PayPal.) I'm ...
3
votes
1answer
307 views

Best practices for handling language

I am a coder, not a database admin, so my question may be a little obvious to some. I just cannot find the correct search term to find the answer. I'm trying to create a database structure for both ...
1
vote
1answer
98 views

Does this query always correctly retrieve the types of array parameters

The following query seems to work, but I am not sure that it is the best/always correct way: select parameter_name, CASE WHEN data_type='ARRAY' THEN SUBSTRING(udt_name, 2)||'[]' ELSE ...
2
votes
2answers
399 views

Can I run a mongos without any config servers?

I just want to use mongos as a tool to scale up the number of connections I can open to mongo. So can I run the mongos without any config servers? Has any one done this before?
3
votes
2answers
1k views

What does a TRUNCATE TABLE write to the Log file in SQL Server?

I know it does not log everything like a DELETE would but I am not sure what it would write to the log file.
3
votes
1answer
373 views

PostGIS ERROR: operator does not exist: postgis.geometry @ geometry

I have had PostgreSQL 9.3.1 and PostGIS 2.1.0 installed (via https://github.com/PostgresApp/PostgresApp/releases/tag/9.3.1.1-RC1) and working on my laptop for some time, and have been doing Ruby ...
2
votes
1answer
3k views

SQL server agent job built on SSIS package not working

I transferred a job from the old SQL Server 2005 to an upgraded SQL Server 2008 R2 instance, and I scripted out everything, changed the data source and other details... "This job should copy some ...
1
vote
2answers
894 views

InnoDB + TokuDB fills up RAM then start swapping

I'm trying to face difficulties with my database lately. I've migrated from MyISAM to TokuDB v7.0.4 and InnoDB. I'm using MariaDB - 5.5.34-MariaDB-1~wheezy-log. My problem is that MariaDB fills up RAM ...
0
votes
1answer
90 views

Aria engine - changing block size

It's possible to change aria_block_size from default 8192 without recreating tables? I want try 1024 or 2048 but after change in my.cnf and restart mariadb I got this errors on aria tables: #138 - ...
1
vote
1answer
281 views

Count records in a related table

I have three tables: items, members, subscriptions. One item can be get by 1 or more members (one member can get more items), so subscriptions represents the many-to-many relationship between items ...
2
votes
1answer
146 views

Does a SQL server unique constraint partially or fully fail a multi-row write?

If some rows of a writing query fails a unique constraint, will only those writes be rejected, or will the entire query fail?
1
vote
1answer
580 views

Stop and Start the Instance In a Job

i have sql server job. in the last step of job i want to stop/start sql server. I create .bat file with NET STOP "MsSqlServer" i try ssis package that use execute process task with cmd.exe and ...
4
votes
1answer
575 views

Database having only db_datareader shows invalid properties for a index

If a SQL server database user has only public permission in server roles and for a particular database only db_datareader and public permission then while trying script index as CREATE To option in ...
5
votes
2answers
561 views

Optimize queries from MySQL SP/Triggers/Functions

I have to investigate a MySQL Production server,While investigating I found a DELETE query in "SHOW PROCESSLIST" which was taking more than 400 second in preparing state, I tried to find the query in ...
0
votes
3answers
2k views

rename datafile when file does not exists

I am trying to clone our production database in test virtual machine. Our production database works with ASM. I would like to use plain file system in test database. I created database, services, ...
0
votes
2answers
241 views

Uninstalling MySQL on Solaris

I have installed MySQL 5.5.31 in Opensolaris. When I tried starting the MySQL server, it says bash: mysql: command not found So, I decided to uninstall the whole lot and try doing again. But I could ...
3
votes
1answer
185 views

Transactional Replication: can create 52 publication, but creating 53rd leads to problems

My apologies in advance for a long post, but I was really trying to make sure I do my due diligence before turning to the community for help, so here it goes. I am working on a proof of concept with ...
1
vote
0answers
188 views

Query takes over 200ms [closed]

So, im using symfony2 with doctrine running in local with WAMP. I have to select from my database : latest shop comments with shop & user informations latest liked shops with shop and user ...
2
votes
1answer
114 views

Primary Key Question

Building a database on Access 2007 and having trouble selecting the primary key. The tables consists of a student table and another table where the students are checked in. I would have liked to make ...
1
vote
2answers
174 views

Recovery from datafiles

Thanks to the recent weather/floods, we lost many of our servers. This included our central database server as well as the server that holds our backups. The database server was running Oracle 12c ...
1
vote
1answer
50 views

Postgres 9.2 under FreeBSD 8.4 - How do I find the databases & tables?

I'm trying to create an osm tileserver and am at the point where i've created the database to hold the output of osm2pgsql. But I can find neither the database (map_data) nor, of course, its tables. ...
6
votes
1answer
2k views

Find the highest graded student, using Tuple Relational Calculus

Suppose I have a table of students, containing their ID and their grade: ----------------- | id | grade | ----------------- | 1 | 83 | | 2 | 94 | | 3 | 92 | | 4 | 78 | ...

15 30 50 per page