[how to] Conditional Join - Specific Column Select |
- Conditional Join - Specific Column Select
- How do you disable anonymous login? - MySQL
- What is the standard isolation level for a db used for money data?
- MySQL server vs client isolation levels
- Parsing an XML field to connect products to multiple categories?
- How to re setup my mysql like it was with all the data
- How to set Innodb Buffer Pool Size
- How to combine date and time to datetime2 in SQL Server?
- Does MySQL reindex on update
- Is using DISTINCT as a hint in subqueries useful?
- What is Required to use Oracle Performance Manager to monitor SQL Server?
- Mysql Server Login and Permission Deny Error
- SQL Server 2012 Page Compression - Determine compression ratio?
- linked server to specific access table
- Accumulo table design methodology
- Way to make differential backup from full different but from same database
- Disaster Recovery for PostgreSQL 9.0
- Oracle Patch Update
- Updateable Subscriptions: Rows do not match between Publisher and Subscriber
- How to add rows/columns to the table in runtime in SSRS 2008
- How to disable oracle's MAX_ENABLED_ROLES limit
- In MySQL, does the order of the columns in a WHERE clause affect query performance,why?
- Efficiently Filter Large Set With Disjunctions
- MySQL crashes with Signal 8 after "Table has no partition for value" error
- Delete word, its meanings, its meaning's example sentences from DB
- MySQL concurrent INSERTs
- How can I optimize this query and support multiple SKUs?
- How to modify an update in Oracle so it performs faster?
| Conditional Join - Specific Column Select Posted: 13 Oct 2013 08:17 PM PDT I have tables like these: Then say that I have conditional join like this: Brief explaination: The query will return the name of recipient from specific order. An order may has recipient id being set, or using submitter id if the recipient is not set. The condition: Both table Is there any conditional join for case like this? |
| How do you disable anonymous login? - MySQL Posted: 13 Oct 2013 05:50 PM PDT According to the MySQL documentation, you can harden a MySQL server by adding passwords, or removing the anonymous accounts.
Before hardening, my users table looked like this. I've remove all anonomous accounts, so that the user table now looks like this. (I'm using puppet to manage the users, but puppet effectively performs a DROP USER command). Why is it that I am still able to login to my test system without a username or a password? Update: I've also just discovered that I can log in as root, without entering a password. Update2: I found this question which has some good information, but does not solve the issue. Theere are no anonymous users I log in as root@localhost I do not have a default password, or skip-grant-tables defined in my.cnf Update3: I have tried performing these steps with puppet, (which should perform a flush privileges automatically). I have also manually flushed privileges and also tried restarting mysql. Update4: |
| What is the standard isolation level for a db used for money data? Posted: 13 Oct 2013 03:51 PM PDT When using a database server for monetary/financial data, I can only assume that using transactions is mandatory. |
| MySQL server vs client isolation levels Posted: 13 Oct 2013 11:31 AM PDT What is the difference between setting the transaction isolation level in the client configuration and the server configuration? |
| Parsing an XML field to connect products to multiple categories? Posted: 13 Oct 2013 10:43 AM PDT I receive an unstructured XML data feed from my vendor. It actually contains two files. The first one is - New Products;Hot Sellers;Jewelery;Glass Ware;Men's Jewelery;Women's Jewelery;Gold Jewelery;Sterling Silver Jewelery;Watches;Bracelets; Diamond Jewelry; Ring's; Gold Rings; Bulova; (and more (in fact there are over 200 categories which I am working on turning into Categories and multiple levels of subcategories) This is followed with all of the 3000+ products. Parsing most of this and generating a table is pretty straight forward (even though I am pretty new to this) the problem I have is that there is a category field that has multiple comma separated fields. Jewelery Women's Jewelery, Women's Watches, Watches, Gold Watches, Fashion Jewelery, Bulova I am looking for a straight forward (and simple) way to parse the field to extract and assign the respective product to all of the categories. Also, what is the best way to design the categories table. Right now I am looking at: Each of these children would contain a number of categories: Watches, Rings, Bracelets, Necklaces, Brand Names, Gold, Sterling Silver, Costume, Fashion, Etc. I have not yet selected a platform as this is critical to populating my store. So the first question is how do I populate my categories table from a semi-colon deliminted file? Secondly, what is the best way to parse a multi-populated (comma separated) single field to assign the product to ALL categories appropriate to said item? I am looking at using a Windows based Platform. |
| How to re setup my mysql like it was with all the data Posted: 13 Oct 2013 10:07 AM PDT My computer had slowed down and I made an image file backup. I then reinstalled windows. How can I use the files that I have backed up to give the newly installed mysql the same data it had last time? I havent got any exports. |
| How to set Innodb Buffer Pool Size Posted: 13 Oct 2013 07:40 AM PDT I have a database using innodb completely. Its now having a But no matter what I do it won't change. I have added a value of 1G both in My mysql keeps on stopping and when i run Is there any other way to enforce this? |
| How to combine date and time to datetime2 in SQL Server? Posted: 13 Oct 2013 08:47 AM PDT Given the following components What is the best way of combining them to produce a Some things which don't work are listed below.
|
| Posted: 13 Oct 2013 10:13 AM PDT I have a users table with various fields which are getting updated frequently. i.e table have: I also have an index on My question is does mysql reindex all table ro reindex index last_active when I update last_active index value or update profile_views or ratings? table: and second table to join to Thanks |
| Is using DISTINCT as a hint in subqueries useful? Posted: 13 Oct 2013 06:42 AM PDT Does adding |
| What is Required to use Oracle Performance Manager to monitor SQL Server? Posted: 13 Oct 2013 09:45 AM PDT I am working with a customer who has several SQL Server and Oracle DBMS server instances. My customer would like to setup up performance data collection, monitoring and alerting for all of their databases. My strength is in SQL Server and I know lots of products/tools for doing this there, but there seems to be very few options for one tool or product that can do both Oracle and SQL Server at the same time. One option that has been suggested is Oracle Performance Manager, which apparently can also monitor SQL Server. I have been trying to read up on it, but there's a lot of doc out there and I am not very familiar with it's implicit context (the Oracle Product suite(s)) so I am having trouble filtering it down to the parts that I need right now to make a recommendation to my client. Here are the things that I am trying to figure out:
Any help on this is much appreciated. |
| Mysql Server Login and Permission Deny Error Posted: 13 Oct 2013 02:11 PM PDT I have a problem with MySQL server. After upgrading MySQL server from 5.3 to 5.4, I am not able to log-in using my MySQL Also not able to grant permissions to users as well. Not able to change in databases using root account, while taking backup of database due to same. When I looked into MySQL databases using Kindly please help me to resolve this issue as it is critical. Log of mysql is as below. 130906 18:46:13 [Warning] Found invalid password for user: 'root@x.x.x.x'; Ignoring user 1843 130906 18:46:13 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it 1844 130906 18:46:14 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist 1845 130906 18:46:14 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure 1846 130906 18:46:14 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure 1847 130906 18:46:14 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure 1848 130906 18:46:14 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure 1849 130906 18:46:14 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure 1850 130906 18:46:14 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure 1851 130906 18:46:14 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure 1852 130906 18:46:14 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure 1853 130906 18:46:14 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure 1854 130906 18:46:14 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure 1855 130906 18:46:14 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure 1856 130906 18:46:14 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure 1857 130906 18:46:14 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure 1858 130906 18:46:14 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure 1859 130906 18:46:14 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure 1860 130906 18:46:14 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure 1861 130906 18:46:14 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure 1861 130906 18:46:14 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure 1862 130906 18:46:14 [ERROR] Column count of mysql.db is wrong. Expected 22, found 13. Created with MySQL 50045, now running 50532. Please use mysql_upgrade to fix this error. 1863 130906 18:46:14 [ERROR] mysql.user has no `Event_priv` column at position 29 1864 130906 18:46:14 [ERROR] Cannot open mysql.event 1865 130906 18:46:14 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. 1866 130906 18:46:14 [Note] /usr/libexec/mysqld: ready for connections. 1867 Version: '5.5.32-cll-lve' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Atomicorp |
| SQL Server 2012 Page Compression - Determine compression ratio? Posted: 13 Oct 2013 05:20 PM PDT We're using SQL Server 2012 and have page compression turned on for a number of our larger tables. Is there a way we can determine the compression ratio we're getting? We'd like to be able to determine the benefits of compression. |
| linked server to specific access table Posted: 13 Oct 2013 08:26 AM PDT I have built a linked server which links my SQL Server database to an Access DB. Using this object someone is able to see all tables in Access. What I would like to do is to isolate it just to 1 table. So my question is how to build a linked server (from SQL Server) connected only to one specific table in Access? |
| Accumulo table design methodology Posted: 13 Oct 2013 11:26 AM PDT I am just getting started with Accumulo and NoSQL databases and I am looking for some discussion on table design. I get the key value structure that is seen in the manual. However, if I am trying to recreate a relational database, I am not sure how relationships work. Can someone explain to some degree how to setup and "Hello World" database (i.e., manager-employee database). I want to use key-value implementation. |
| Way to make differential backup from full different but from same database Posted: 13 Oct 2013 03:26 PM PDT I have the following situation: Our sql server is running in a cloud service. The database to be backed up have 60gb. We need to make a local copy of the database for some tests, and it need to be up to date, but 60gb is impracticable to download daily. We thought to make a full backup, download it one time, make differential backups in following days. Once a week, we can stop the database operations to make the last differential backup from last week full backup and make a full backup, and start again the database operations. In this moment, the local bd, when restored with the last diff backup (made when the db was with stopped operations), have the same data than the last week full backup. The idea behind this is, if is possible to use the diff backup from last full backup and restore it in our local database. If it is not possible, anyone have some idea of what we can do to get all the data, up to date, from our cloud database? |
| Disaster Recovery for PostgreSQL 9.0 Posted: 13 Oct 2013 07:26 PM PDT We have a number of PostgreSQL 9.0 servers. We use binary replication to have a host standby instance of those. The only problem is that is someone drops the master, with or without intentions, this will cascade to the replicas as well. I'm looking at the possible ways to avoid this. One possible option in seems to be Point in Time Recovery. I'm just wondering what could be a good design for this. Any ideas? Let's assume the master is compromised and we lose everything we have there. How can we avoid losing the replica or at least have a way to bring it back if it's dropped? |
| Posted: 13 Oct 2013 12:26 PM PDT We have an Oracle RAC production environment with primary and secondary DB. Our DBA has asked to update oracle version from 11.2.0.1.0(64 bit) to 11.2.0.3(64 bit) with patch 6880880,10404530,16803769 and 16803775. In our current database we have Shared storage,ACL settings, security settings,Gateway/Heteregenous connectivity, Dataguard, Data broker, Backup policy and Oracle Client installed on other machines. DBA has estimated that he need to do installation, settings from scratch and test.. So, when the version is updated, do we really need to reconfig and install everything (Shared storage,ACL settings, security settings,Gateway/Heteregenous connectivity, Dataguard, Data broker, Backup policy and Oracle Client installed on other machines) ?? If yes its fine, but no then I need to justify it. I can understand testing would be required.. |
| Updateable Subscriptions: Rows do not match between Publisher and Subscriber Posted: 13 Oct 2013 09:26 PM PDT I have transactional replication with updatable subscribers set up in SQL Server 2008. It has 3 subscribers and 1 publisher. I had to setup replication again due to some errors related to the database and the application which uses the database. However, now I run into issues when I try updating a section in my application. It does not go through the with update and gives the following error:
The update statement obviously doesn't go through. However, when I try it the second time it works. Replication is working. Everything seems to be replication. Can anyone explain why this error would occur and how I can resolve this issue. I would really appreciate the help!... |
| How to add rows/columns to the table in runtime in SSRS 2008 Posted: 13 Oct 2013 10:26 AM PDT Usually we design the table to have x number of rows and y number of columns in a report. But how can we create a report which adds the rows and columns dynamically at run time based on the result of the source query? For example I want to list stdentId, StudentName and any course each student has enrolled in. As the number of courses is different from one person to the other, I should add the rows and related column for courses at run time based on the query result. How can it be done? For example: Thanks for your help in advance. |
| How to disable oracle's MAX_ENABLED_ROLES limit Posted: 13 Oct 2013 04:26 PM PDT How to disable oracle's MAX_ENABLED_ROLES limit or expand the value of limitation. [oracle 10g (win32)] |
| In MySQL, does the order of the columns in a WHERE clause affect query performance,why? Posted: 13 Oct 2013 01:26 PM PDT I have a query that doesn't use any indexes: The |
| Efficiently Filter Large Set With Disjunctions Posted: 13 Oct 2013 07:26 AM PDT Let's say I have a single table In this example I want users to be able to create "partially ad-hoc" queries against this table. I say partially because a few parts of the query will always fixed:
The user can optionally filter on any of the other columns. They can filter on none, one, or many. And for each column the user may select from a set of values which will be applied as a disjunction. For example: Now assume the table has 100,000,000 rows. The best I can come up with is a covering index that includes each of the "optional" columns: This gives me a query plan as follows:
It seems pretty good. About 80%-90% of the cost comes from the Index Seek operation, which is ideal. Are there better strategies for implementing this kind of searching? I don't necessarily want to offload the optional filtering to the client because in some cases the result set from the "fixed" part could be 100s or 1000s. The client would then also be responsible for sorting and paging which might too much work for the client. |
| MySQL crashes with Signal 8 after "Table has no partition for value" error Posted: 13 Oct 2013 02:08 PM PDT We have a mysql database running well and suddenly it stops and below are the snippet of the log file. What is the best remedy in this scenario? |
| Delete word, its meanings, its meaning's example sentences from DB Posted: 13 Oct 2013 05:26 PM PDT I have three tables as below (simplified for demonstration): where, Edit1: I am using SQLite3 as the database. Edit2: I figured the following solution which requires 3 sql queries in order: I'm still looking for the answer to my question: is the whole process possible to be done in one query? |
| Posted: 13 Oct 2013 09:26 AM PDT I have a MySQL database with InnoDB tables. There are different client processes making |
| How can I optimize this query and support multiple SKUs? Posted: 13 Oct 2013 03:26 PM PDT My current query only can select one SKU at a time. I can leave |
| How to modify an update in Oracle so it performs faster? Posted: 13 Oct 2013 02:26 PM PDT I have this query: The trouble that I am having is that this query takes a long time to run. I don't know whether it is possible to run this on parallel, or it would be easier to update a cursor in a pipeline function. What would you suggest? This is all the information that I believe it is relevant. This is the execution plan of the internal select: Table data: This is the script of the historical table: This is the other table: The temporary table is the result of FEE_SCHEDULE_HISTORICAL minus FEE_SCHEDULE |
| 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 | |
