[how to] Is STRICT_TRANS_TABLES required for replication? |
- Is STRICT_TRANS_TABLES required for replication?
- Schema Change Script : Validation and test cases
- What is the difference between COUNT(*) and COUNT(*) OVER()
- Need to learn SQL quickly
- Is there a logical way to visualise a join by looking at it quickly
- how to create an incremental database copy in postgresql?
- Why do large tables slow down queries in databases?
- Is there a way to auto resume an incomplete job after sql server restart?
- Comparing binary 0x and 0x00 turns out to be equal on SQL Server
- Finding swap causes of MySQL
- How to access a SQL Server database from other computer connected to the same workgroup?
- Update year alone in date (Oracle 11g)
- Oracle intermittent performance problem
- Use surrogate or natural PK if a row is uniquely identified by two or more columns?
- MySQL SSL encryption
- mongodb replication node stuck at “STARTUP2” with optimeDate as 1970
- How to repair Microsoft.SqlServer.Types assembly
- Unable to connect to Amazon RDS instance
- Will Partitions and Indexes on the same table help in performace of Inserts and Selects?
- Efficient way to perform approximated search?
- MySQL: Error reading communication packets
- How to remove column output in a for xml path query with a group by expression?
- Best cloud platform for PostgreSQL
- Inserting query result to another table hangs on "Copying to temp table on disk" on MySQL
- Primary key type change not reflected in foreign keys with MySQL Workbench
- How to troubleshoot enq: TX - row lock contention?
- What specific tests need to be performed under Database migration from DB2 to Oracle?
Is STRICT_TRANS_TABLES required for replication? Posted: 24 Aug 2013 08:23 PM PDT Is STRICT_TRANS_TABLES required for replication? Particularly, I need to know about it for Percona Cluster. |
Schema Change Script : Validation and test cases Posted: 24 Aug 2013 07:14 PM PDT I have written a schema change script to remove a certain column C from Table A to Table B. This is my logic/algorithm,
I have written the script for the same( a simple one, though). Now, since Database changes are highly critical because its going to be run on Production database and the column contains some values related to Users' billing information, I want to test them completely before going for deployment. I would like to get suggestions for Test-cases to validate the script.Since, this is the first time we're going to making this scripts, any other advice on potential problems while making change scripts, would be appreciated as well. |
What is the difference between COUNT(*) and COUNT(*) OVER() Posted: 24 Aug 2013 04:59 PM PDT Take the following code example:
What does |
Posted: 24 Aug 2013 03:02 PM PDT I am a 14 year freelance web and software developer. In the middle of a project, a client threw a need for a database to me. I need to learn/be able to use SQL very soon. What resources do you professionals suggest? Thank you! -TJonS |
Is there a logical way to visualise a join by looking at it quickly Posted: 24 Aug 2013 01:40 PM PDT As the question asks, is there a logical way of visualising a join in your head quickly. I always have trouble visualising the reason for a join from looking at the code, and have to go and visually inspect the tables to see what the relationships are. For example ( a simple one ) I could logically look at this query and form the idea in my head..
What quick processes do you have for visualing joins? |
how to create an incremental database copy in postgresql? Posted: 24 Aug 2013 08:57 PM PDT Virtual machine software like VirtualBox allow one to make incremental VM clones. That is data, once "touched" (opened writable), will be copied and stored in the incremental cache of the new clone. I am searching for the same option for a Postgres DBMS. How can I setup an incremental database copy, where entries are read from the original database, and touched/modified rows from the local copy? If not on the DBMS level, how can I emulate such behavior at the file-system/storage level using a separate DBMS instance? Background: The idea is to utilize the powerful database-server yet without incurring much resource overhead for a staged/developer database-copy. Feel free to edit the subject or post to improve clarity. |
Why do large tables slow down queries in databases? Posted: 24 Aug 2013 11:48 AM PDT Kind of a generic question; but I have noticed that large tables in certain CMS's can slow them down to a crawl. The solutions for this I've seen are to just truncate those tables. Why do large tables slow down SQL queries so much? How do Indexes help large tables? How does disk speed factor into this? |
Is there a way to auto resume an incomplete job after sql server restart? Posted: 24 Aug 2013 07:47 PM PDT I ran into problem of job stopped after the sql server restart. Is there a way to auto resume an incomplete job after sql server restart? Thanks! |
Comparing binary 0x and 0x00 turns out to be equal on SQL Server Posted: 24 Aug 2013 01:13 PM PDT It seems that SQL Server considers 0x and 0x00 equal values: This outputs How can I get true binary bit-for-bit comparison behavior? Also, what are the exact rules under which two Also note the following behavior: Background of the question is that I'm trying to deduplicate binary data. I need to Note, that |
Posted: 24 Aug 2013 03:49 AM PDT In my centos 6.3 server I have a MySQL 5.5.33 database. But I have some cron queries that runs every 3 hours. They don't use any index, they runs very slow and every query runs nearly 1500-2000 ms. I don't plan to add new indexes for them, because in that case I have to add many indexes and that queries run very rare. When I restart my database server, -normally- swap is zero. After some time swapping becomes large gradually. After 13 days, I get 650MB swap of MySQL. I want to find what causes this swapping and try to reduce the swap without performance grade. I want to be sure that the cause is cron queries or some other thing causes this swap size. My |
How to access a SQL Server database from other computer connected to the same workgroup? Posted: 24 Aug 2013 05:12 PM PDT I have created a C# application which uses a SQL Server database. I have other computers connected to me and to each other in a workgroup. I have shared my C# application with others. When they open the application they get the error
But the application is working fine on my PC. The connection string I am using is which is stored in a The application is working fine on my PC. What must I do? I have enabled the TCP/IP in the server but the same error persists. Some change in connection string or something else? Please help.. Thank you.. |
Update year alone in date (Oracle 11g) Posted: 24 Aug 2013 02:49 PM PDT When I checked one of my client's database, I found some mistakes which will make problems. The problem is that the date is showing as I can find the dates with this problem by using this query
Can I update this using the logic that
How can I do this? Can I do it using Oracle query or should I write code for doing so? Database is Oracle 11g R2 working in RHEL5. |
Oracle intermittent performance problem Posted: 24 Aug 2013 06:51 PM PDT I have some complex queries that are usually fast (< 1 sec), but occasionally slow (> 10 sec, even minutes). How do I track this down or identify what condition is causing it? One theory was caching - perhaps the query is fast when the blocks cached in memory. I tried flushing both the shared pool and the buffer cache ("alter system flush buffer_cache") but the query is still fast after doing that. Is there a way to nail down precisely what was going on during a specific execution that was bad, and which part of query execution took the longest? |
Use surrogate or natural PK if a row is uniquely identified by two or more columns? Posted: 24 Aug 2013 08:26 PM PDT I am having a hard time choosing between natural and surrogate PK for my database table. The database is for a ranking system for an MOBA game. Here is more or less what I would do if I were to go the natural route. Player table Rank table The thing is, each row in the player table is uniquely identified by the pair of PlayerName and ServerName. I thought using a surrogate key in this case is not really appropriate but I would like to hear suggestions on this. |
Posted: 24 Aug 2013 03:15 PM PDT Does setting After setting Thanks! |
mongodb replication node stuck at “STARTUP2” with optimeDate as 1970 Posted: 24 Aug 2013 04:15 AM PDT i have just setup replica sets with three nodes . the third node is stuck at stateStr STARTUP2 with "optimeDate" : ISODate("1970-01-01T00:00:00Z"). However its showing no error message. Is this alright. On primary rs.status() yeilds also db.printSlaveReplicationInfo() on yields Is this alright. Also how can i test my replication especially the third node |
How to repair Microsoft.SqlServer.Types assembly Posted: 24 Aug 2013 06:15 PM PDT When I run a checkdb('mydb') this is the only error message printed. It is referring to 'Microsoft.SqlServer.Types' I do see that in the this db the clr_name is blank. but under the master db there is a value in there. I tried to drop or alter the assembly to add this value but its restricted. btw, this db was updated lately from sql-server 2005 to 2008R2. |
Unable to connect to Amazon RDS instance Posted: 24 Aug 2013 02:15 PM PDT I recently created an oracle instance on Amazon RDS. Unfortunately, I'm not able to connect to the instance using Oracle SQL Developer. The (relevant) information I have from Amazon; Endpoint - The DNS address of the DB Instance: xxx.yyy.eu-west-1.rds.amazonaws.com DB Name - The definition of the term Database Name depends on the database engine in use. For the MySQL database engine, the Database Name is the name of a database hosted in your Amazon DB Instance. An Amazon DB Instance can host multiple databases. Databases hosted by the same DB Instance must have a unique name within that instance. For the Oracle database engine, Database Name is used to set the value of ORACLE_SID, which must be supplied when connecting to the Oracle RDS instance: ZZZ Master Username - Name of master user for your DB Instance: org Port - Port number on which the database accepts connections: 1521 From this information, the connection settings in SQL Developer are pretty obvious, so I don't really see what I could be missing... |
Will Partitions and Indexes on the same table help in performace of Inserts and Selects? Posted: 24 Aug 2013 07:15 PM PDT I have a table containing the list of visitors and this table has the following information.
I have a second table that maintains the history of each visits, which means I if the same visitor visits the site, I insert into the second table and update the no. of visits on the first table. The kind of reports that I have to generate for this table are
On an average there are about 20000 inserts to the second table and about 15000 inserts to the first table, meaning 5000 were updates to the first table (5000 repeat visits). I need to decide between partitioning the tables by month and sub-partitioning by days for the reports 1,2,3 and index the browser related columns for report 4. There will be more reports in the future not sure on what clauses. Does partitioning/sub-partitioning along with indexing help in the performance of inserts and selects? Should I perform partitioning on both the tables? I am currently using MySQL 5.5 + InnoDB |
Efficient way to perform approximated search? Posted: 24 Aug 2013 11:15 AM PDT I have to perform a join between As it happens though, the
To tackle the situation, there are a few possibilities I am experimenting, but my doubt is on which architecture should I use to perform a very efficient "approximated join" - these tables are partitioned, sub-partitioned and each sub part may contain billions of records... (although I have a reasonable amount of resources). For once, I thought of storing the unique sencond of the event (i.e. second it happened since julian calendar) on both sides so the real join (give a " But I am unsure of how efficiently would that perform with the indexes and scans.. This is just an example, I am not stuck to any sort of architecture. Also, I am using Oracle 11gR2. |
MySQL: Error reading communication packets Posted: 24 Aug 2013 07:15 AM PDT I get this warning in mysql, I have been through few topics in google and according to some suggestion I increased the I am using Drupal 7, and yes there are lots of blob data types, but Any other workaround how to overcome this warning ? EDIT: Added some settings as @Rolando's suggestions/answer, I still get the same warning. My mysql config looks like this: My application uses only InnoDB, but there are few database like mysql, which came with the standard mysql installations are only the ones which uses MyISAM engine type, I guess that should not be my concern though. As you can see I have replication too, the warning is the same one in replicated server too, whose config is identical as this. |
How to remove column output in a for xml path query with a group by expression? Posted: 24 Aug 2013 12:15 PM PDT I forgot how to remove a column from being output in a Added XML Body: I will look around again online, but I asking for the syntax to SQL Server to NOT USE "idForSomething" column in the final output. I thought it was something like NOOUTPUT but I can't remember and it does not work. |
Best cloud platform for PostgreSQL Posted: 24 Aug 2013 10:18 AM PDT Currently, in our project, we use dedicated servers for our PostgreSQL database. In theory, we can run anything on some cloud platforms. However, PostgreSQL configuration is strictly related to hardware configuration. What we are looking for is a cloud solution with native PostgreSQL support. Here is the list of desired features:
So what are the options and the best pick for such a service? |
Inserting query result to another table hangs on "Copying to temp table on disk" on MySQL Posted: 24 Aug 2013 04:15 PM PDT I started the process of inserting returned results to another table. The query groups the rows in respect of indexed IDs. This causes 149,000,000 rows to be decreased to 460,000 rows. The query includes 3 table Further information, the process completes in about 12 seconds for a test file which has 1000 input rows, and returns 703 rows. I started the query earlier ### we don't know when earlier is ###, but it is still running in the state: "Copying to temp table on disk" after 38000 seconds (10 and a half hours). I think there is a problem during the insertion process. What am I probably doing wrong here? If it helps, the operating system of the computer is Windows 7, it has 3 GB RAM, an Intel Core2Duo 2.27GHz processor. ### you forgot to tell us details on the hard drive. One partition in, one out, same disk, same partitions, etc ### Here's my query as it currently reads: |
Primary key type change not reflected in foreign keys with MySQL Workbench Posted: 24 Aug 2013 05:15 PM PDT I have a problem with MySQL Workbench and primary/foreign keys. I have some tables with PKs involved in relationship with other tables. If I modify the type of the PK, the type of the FK doesn't automatically update to reflect the change. Is there any solution? Do I have to manually modify all the relations? |
How to troubleshoot enq: TX - row lock contention? Posted: 24 Aug 2013 07:22 AM PDT I have the following situation. I have RAC. On both nodes there are the locks. On the First Node Blocking session info On the Second Node Blocking session info Additional Info : Blocking session SQL_TEXT How do I troubleshoot this ?As you can see blocking session is INACTIVE but still locking. If I From where to start?I can guess that there is missing commit/rollback but application developer says "I have everything ok, I have written commit where it is necessary" Please help. |
What specific tests need to be performed under Database migration from DB2 to Oracle? Posted: 24 Aug 2013 01:35 PM PDT Currently I am going to be testing (I am a Data Analyst) of a larger migration project where they are planning to migrate from DB2 to Oracle. My question may be little broader; however any information which relates to the following questions would certainly be helpful. 1) How to validate both under Source and Target tables for:
2) How to validate from Front end (UI), so that right data is getting populated under right table: Challenge
3) Any specific challenges I need to see under migration
|
You are subscribed to email updates from Recent Questions - Database Administrators Stack Exchange To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment