[how to] Does limit impact affected rows or not? |
- Does limit impact affected rows or not?
- Restoring tab exports to a mysql database with integrity
- MySQL: update instead of delete if foreign key constraint?
- Relation between max values for table_open_cache and open_files_limit?
- Expanding from one to one to one to many relationship for 2 tables
- How to automatically backup MongoDB?
- Stored procedure to handle empty sets
- best ETL design to transfer transaction tables records into the data-warehouse
- Trying to create PostGIS table
- MySQL Replication fails - commands received in wrong order?
- How to access a SQL Server database from other computer connected to the same workgroup?
- my.cnf validation
- How do I migrate varbinary data to Netezza?
- How can I get my linked server working using Windows authentication?
- Connection to local SQL Server 2012 can be established from SSMS 2008 but not from SSMS 2012
- Design consideration regarding state handling: how to store multiple, variable states for one entity
- How to handle "many columns" in OLAP RDBMS
- Mysql DB server hits 400% CPU
- What are the different ways to keep track of active and archived data?
- Database stuck in restoring and snapshot unavailable
- Multiple database servers for performance vs failover
- Access 2003 (SQL Server 2000) migration to SQL Azure
- Truncate table is taking too long in PostgreSQL
- InnoDB - How to get top locked tables and rows which are locked
- PostGIS: Remove stale/obsolete geometry columns from the geometry_columns table [on hold]
- PgAdmin III - How to connect to database when password is empty?
Does limit impact affected rows or not? Posted: 01 Sep 2013 05:31 PM PDT I have this table: when run this query: its out put is: I think something is wrong! because it affected 543 rows but I think it should affect 30 rows at maximum. Is it true? |
Restoring tab exports to a mysql database with integrity Posted: 01 Sep 2013 02:33 PM PDT I have a database with a lot of data for a client that's on a shared web host. Doing a plain mysqldump is causing the job to get killed on the server, so we were looking at backing up the tables individually. I've found that the Is there a more automated way I can lock the database and load the individual tab files, to ensure that I have the database restored to the state it was backed up in? |
MySQL: update instead of delete if foreign key constraint? Posted: 01 Sep 2013 07:46 PM PDT I have a bit of a strange question. I know about insert on duplicate key update. My question is, is there something similar for deletes that fail because of foreign key constraints? For example: delete from table1 where value='something'; But, table2 has a foreign key that depends on the the value I want to delete in table1, so the delete fails. I'd like to do something like this: delete from table1 where value='something' on foreign key fail update some_other_value='something else'; I know that looks really weird, but I have a good reason for doing it (without getting into details, it has to do with versioning historical data that can't be destroyed in the event that a value is referenced elsewhere.) I can figure out how to do this with more than one query, of course, but I'd like to do it in a single query if I can. I'm pretty sure it's not possible, but I'd like to ask before giving up :) Thanks! |
Relation between max values for table_open_cache and open_files_limit? Posted: 01 Sep 2013 09:44 AM PDT From MySQL documentation: Max value limit for When I applied max limit, mysql server started but with following warnings in error log: I see that max-limit for open_files_limit is less than table_open_cache. I feel this is strange and open_file_limit should be always greater than table_open_cache. Neverthless, I set open_file_limit to larger than 65536 and it worked. I am now wondering, how these are related? Is there any mistake in MySQL documentation? p.s. I modified |
Expanding from one to one to one to many relationship for 2 tables Posted: 01 Sep 2013 12:34 PM PDT I have 4 tables Below is a sample data so if looking at tblEAlert for line 1 & 2 is linked to tblSData 1 and 3,4,5 and 6 is linked tblData 2 |
How to automatically backup MongoDB? Posted: 01 Sep 2013 07:51 AM PDT How to automatically backup MongoDB ? for example daily ps : daily , monthly |
Stored procedure to handle empty sets Posted: 01 Sep 2013 04:12 AM PDT How can I make a stored procedure to print a specific message if an empty set wa returned by the query? |
best ETL design to transfer transaction tables records into the data-warehouse Posted: 01 Sep 2013 11:19 AM PDT I have 2 type of tables to populate the data-warehouse with every day, lookup tables or configuration tables with few 100s records, and thats easy where i just truncate and refill the table. but for transaction tables, that have many records, i usually increment, that is i run the ETL daily to add yesterdays records. i have 2 problems that i face always
now i am trying to design a way where i over come these 2 problems as well as am trying to develop the ETL in such a way that it can auto fix it self incase any of these events occur. i want it to check if there are missing days and run run the ETL for that day, and check if there are duplicates and delete them. below are ways i though of 1. i take in the last 5 days regardless, every day the ETL runs, deletes the last 5 days and refill. 2. i check the destination tables if they have missing dates in the last month and then i query the source with the missing days. keeping in mind that the source is a huge table in a production environment that i have to optimize my query to the maximum when requesting from it. thanks |
Trying to create PostGIS table Posted: 31 Aug 2013 11:04 PM PDT I have create a database following the hompage http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2648455 and now I can't create a simple non-spatial table with I have use I use and there is just two table not I create I want to COPY a csv table into Postgis database but i can't even create a empty table to do it? please help me to create a table! |
MySQL Replication fails - commands received in wrong order? Posted: 31 Aug 2013 11:59 PM PDT The other day, I had this issue with one of our MySQL 5.1.60 master and 5.1.61 slave setups: Got to mention, that we just "host" the MySQL servers/setups; the content (including INDEXes and such) comes from the customer. We just run it. Okay, so here's what happened, as far as I understand it:
In that order. On the slave, that failed. It failed, because the table picturesource did not exist on the slave. How can that happen? Why did the slave try to add the index BEFORE creating the table? I mean, on the master, the table MUST have existed before they added the key. Don't know if it's important, but Can someone clarify? |
How to access a SQL Server database from other computer connected to the same workgroup? Posted: 01 Sep 2013 12:46 AM 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.. |
Posted: 01 Sep 2013 01:18 PM PDT We have moved our server from old 8 GB RAM Server to new 16 GB RAM server so that we could have better performance. The server is still consuming lot of MEMORY. The tables in the database are not designed for InnoDB. The DB physical file size is approximately 2.8 GB. my.cnf parameters are : Please any one can validate my.cnf and suggest why taking much memory. |
How do I migrate varbinary data to Netezza? Posted: 01 Sep 2013 03:18 PM PDT I got a warning message while migrating DDL from SQL Server to Netezza:
I'm wondering whether this kind of data conversion will cause some issues such as truncation of data etc.? |
How can I get my linked server working using Windows authentication? Posted: 01 Sep 2013 04:18 PM PDT I'm trying to get a linked server to ServerA created on another server, ServerB using "Be made using the login's current security context" in a domain environment. I read that I'd need to have SPNs created for the service accounts that run SQL Server on each of the servers in order to enable Kerberos. I've done that and both now show the authentication scheme to be Kerberos, however, I'm still facing the error: In Active Directory, I can see that the service account for ServerB is trusted for delegation to MSSQLSvc, but I noticed that the service account for ServerA does not yet have "trust this user for delegation" enabled. Does the target server also need to have that option enabled? Is anything else necessary to be able to use the current Windows login to use a linked server? |
Connection to local SQL Server 2012 can be established from SSMS 2008 but not from SSMS 2012 Posted: 01 Sep 2013 05:18 PM PDT I have two local SQL Server instances running on my local machine. The first is SQL Server 2008 R2 Enterprise Edition (named MSSQLSERVER) and the 2nd is SQL Server 2012 Business Intelligence Edition. My problem is with SSMS 2012 which can connect to distant servers but not the local 2012 instance; I can however connect to this instance from SSMS 2008. The error message I get when trying to login is
I must point out that I don't have the necessary privileges to access SQL Server Configuration Manager (blocked by group policy). Any help would be appreciated. |
Design consideration regarding state handling: how to store multiple, variable states for one entity Posted: 01 Sep 2013 10:18 AM PDT First I have to admit that I'm not a database professional neither are my colleagues. For a new project my colleagues and me came to a design question we couldn't really solve easily. And all the ideas had some disadvantages, so we could't figure out what's the best way to go. We have a main entity "Transaction" which should be processed by "ProcessingRules". The processing rules can be configured by the users in the Web application (each rule has a different execution scheduling. One might be running every hour, whereas the others might run nightly). Lets say Transaction gets 10'000 new records a day. This would lead to a DB design where I need to keep the State "Processed YES/NO" for each "ProcessingRule" and "Transaction". I thought the proper way is to have a relation table between the "ProcessingRoles" and the "Transaction". If no record present, the record has not been processed by this role yet. Transaction [0..1] ------ [*] TransactionRuleProcessing [*] ------- [0..1] ProcessingRule But when I think of the Query, this would lead into a WHERE NOT EXISTS (SELECT 1 FROM TransactionRuleProcessing...) query for the rule to identify new or unprocessed records. If we have a large amount of rows in Transaction, I think this will affect performance because the NOT EXISTS will have to join the whole table to the state table. If I'm not mistaken, this might cause a performance issue. On the other side, if we had only one state directly on the Transaction table, we could add an index and there would be no join between the large Transaction table and the state table. Question:Is it true that such a NOT EXISTS query would have to join the whole Transaction table with the TransactionRuleProcessing table to identify non existing (processed) rows? How could this affect performance of the database with a large Transaction table? What would be other recommendations to flag a record by a various amount of states? Any ideas very much appreciated |
How to handle "many columns" in OLAP RDBMS Posted: 01 Sep 2013 02:18 PM PDT I have a fact that has around 1K different numerical attributes (i.e. columns). I would like to store this in to a column-oriented DB and perform cube analysis on it. I tried to design a star schema, but I'm not sure how to handle this many columns. Normalising it sounds wrong, but I can't just have flat columns either. The combination of attributes are also too diverse to have a simple dimension table for this, even if I'd reduce the numerical values into categories (ranges), which is an option. I thought about storing them as XML or JSON for each row, but that doesn't sound great either. If it helps, I'm planning to use Amazon's redshift for the DB. Note: We have strong preference for RedShift as it fits perfectly for at least other few operations we do on this data. Hence I want to avoid other technologies like HBase if possible. |
Posted: 01 Sep 2013 12:18 PM PDT I have been facing problem with my database server quite a month, Below are the observations that I see when it hits the top. And then drains down within 5 minutes. And when I check the show processlist I see queries for DML and SQL are halted for some minutes. And it processes very slowly. Whereas each query are indexed appropriately and there will be no delay most of the time it returns less than 1 second for any query that are being executed to server the application.
Below url shows show innodb status \G and show open tables; at the time spike. And this reduced within 5 minutes. Sometimes rare scenarios like once in two months I see the processes takes more than 5 to 8 hours to drain normal. All time I notice the load processor utilization and how it gradually splits its task and keep monitoring the process and innodb status and IO status. I need not do anything to bring it down. It servers the applications promptly and after some time it drains down to normal. Can you find anything suspicious in the url if any locks or OS waits any suggestion to initially triage with or what could have caused such spikes ? http://tinyurl.com/bm5v4pl -> "show innodb status \G and show open tables at DB spikes." Also there are some concerns that I would like to share with you.
|
What are the different ways to keep track of active and archived data? Posted: 01 Sep 2013 02:18 AM PDT I'm looking for different ways to keep track of both active and archived data so I can pro and con them. The system: Example: This seems like the easiest and most simple way to do it, but I can't find any other ways via google search to see if there are any other ways to do something like this. |
Database stuck in restoring and snapshot unavailable Posted: 01 Sep 2013 11:18 AM PDT I tried to restore my database from a snapshot. This usually took around a minute to complete the last couple of times. When I did it today, it didn't complete for around 30 minutes and the spid was in a suspended state. I stopped the query and now my database is stuck in restoring state and my snapshot is unavailable. Am I screwed? |
Multiple database servers for performance vs failover Posted: 01 Sep 2013 07:18 PM PDT If I have two database servers, and I am looking for maximum performance vs high-availability, what configuration would be best? Assuming the architecture is two load-balanced web/app servers in front of two db servers, will I be able to have both db servers active with synced data, with web1 to db1, web2 to db2 setup? Is this active/active? I'm also aware that the two db servers can have their own schema to manually 'split' the db needs of the app. In this case daily backups would be fine. We don't have 'mission critical data.' If it matters, we have traffic around 3,000-7,000 simultaneous users. |
Access 2003 (SQL Server 2000) migration to SQL Azure Posted: 01 Sep 2013 08:18 AM PDT As my old Windows 2003 RAID controller started throwing errors, I am seriously thinking about switching current Access 2003 (adp/ADO) clients to use a Windows SQL Azure solution, in place of current SQL Server 2000. Does anybody knows if this is a feasable/painless operation? |
Truncate table is taking too long in PostgreSQL Posted: 01 Sep 2013 05:57 AM PDT I have many databases on the same server, all with same templates. When I execute The version is 9.1. Any other info needed? |
InnoDB - How to get top locked tables and rows which are locked Posted: 01 Sep 2013 03:18 AM PDT I was searching for a tool OR query which can give me top locked tables and which particular row is locked, Is it possible to get ? |
PostGIS: Remove stale/obsolete geometry columns from the geometry_columns table [on hold] Posted: 31 Aug 2013 10:22 PM PDT I understand that the function This is after a call to EDIT: As per Darrell Fuhriman's answer on GIS.SX, there are three ways:
|
PgAdmin III - How to connect to database when password is empty? Posted: 01 Sep 2013 07:00 PM PDT I have installed PostgreSQL 9.1 on my PC (Win 7). I have a small Java application connecting successfully to it with However, it is refused from PgAdmin III itself. I get: How do I connect to my database from PgAdmin III with an empty password? EDIT This is just a test, not production code. |
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