[how to] MySQL: Is "using temporary" always a bad thing? |
- MySQL: Is "using temporary" always a bad thing?
- DBCC CHECKDB Notification
- mySQL- large database
- Archive partition before delete it?
- SQL Server taking a lot of memory
- Unique index for subquery with RANK() function
- How to import .mdf database to MYSQL (.sql) database? [duplicate]
- what kind of owner to defined when creating Sql server DB for web site?
- Adding users to a list and sort by category?
- How to Handle TimeZone Properly in SQL SERVER?
- MySQL format numbers with comma [closed]
- How do I find an invalid utf8 character "somewhere" in my MySQL/trac database
- While restoring copy of SQL Server 2008 backup file in SQL Server 2008 R2 degraded performance
- MySQL5.6 on Mac OS X 10.6.8 problems when granting permissions to root
- SQL Server 2005 upgrade service pack via command line
- MySQL performance tuning + queries stuck on "Copying to tmp table"
- how to dump a single stored procedure from a database
- How to find when last reindexing happened in sql server?
- Deriving formulas for input/output
- innobackupex is failing while exporting backup
- Trying to create PostGIS database
- Same field but different contents
MySQL: Is "using temporary" always a bad thing? Posted: 07 Apr 2013 05:10 PM PDT Is To give an example, I have a three-way join on three very large tables. The indexes are correct. The columns being joined on are indexed and have matching column lengths. The only red flag is These are in-memory temp tables, not disk tables, so I'm thinking, maybe it's just how MySQL works, and not always a bad thing. (To give a sense of size... the row product is |
Posted: 07 Apr 2013 06:34 PM PDT There are plenty of questions on DBA.SE regarding I came across this article by Cindy Gross, which has some very good notes. In it she mentions use of SQL Server Agent that if it finds errors from the execution of the Now I am curious if anyone knows that the Check Database Integrity Task in a maintenance plan would do the same thing? MSDN does not mention that it will and I have not truthfully been an environment where it has come across a corruption issue; so can't say that it does. This would be versus simply setting up a SQL Agent Job with multiple steps that runs the specific command against each database, as Cindy suggested. Thoughts? Obviously proof is in the pudding so providing more than just a guess would be helpful... |
Posted: 07 Apr 2013 05:14 PM PDT I need guideline to setup DBMS(MYSQL or SQL Server 2008). The database size is expected upto 80-100GB in next few months. One main table will contain textual content like essays. Can MySQL handle such big size database and can full text search really work for me for such big database. Should I consider MySQL or any other? Thanks |
Archive partition before delete it? Posted: 07 Apr 2013 10:51 AM PDT I have manage to create an event and with the following scripts could both create and delete the partition. The issue now I need help on how to save the partition before its deleted? Should I use percona tools or mysqldump itself? |
SQL Server taking a lot of memory Posted: 07 Apr 2013 05:39 PM PDT I have SQL Server Express on my VPS(2GB RAM) with a database size of 1.5 GB that I expect will increase to 15 GB. I have noticed that SQL Server is using 1.5 GB RAM even when only small queries has been run against the database. Is there any relation between memory and database size? Can I tune my SQL Server so it can handle memory better and not use as much memory as it does now? Here is the memory status of SQL Server: |
Unique index for subquery with RANK() function Posted: 07 Apr 2013 09:36 AM PDT I have the following tables: That is, the MyEntity table has all changes to an entity. When an entity is created, modified, or deleted, a new record is inserted into MyEntity and into Revision, so that the entire history is tracked. I would like a view to have the latest version of each entity: However, I would like to create an unique index (and hence constraint) such that the Name is unique for the latest revision only. I cannot create an index on the view, because of the subquery in the view. How can I accomplish this? |
How to import .mdf database to MYSQL (.sql) database? [duplicate] Posted: 07 Apr 2013 10:33 AM PDT This question already has an answer here:
Two database file named "xxx.mdf" & "xxx.ldf" are provided and I want to import the database to phpmyadmin and for that i want to make .sql file and to make multiple query from it... Need urgent information. |
what kind of owner to defined when creating Sql server DB for web site? Posted: 07 Apr 2013 10:24 AM PDT what kind of owner to defined when creating Sql server DB for web site ? I am trying to create db and i need to select owner. my db will serve aspnet web site and I wonder witch owner will be safe to defined for this db ? Thanks. |
Adding users to a list and sort by category? Posted: 07 Apr 2013 05:29 AM PDT I'm using SQL-Server 2012 and I would like to know how to solve this program. So: I want to create a page that allows admins to manage a project, and part of it, would be to add members/employees to the project (Project Table). Now, I have another table, users, containing all the users on the system. Each project has a different department (departments can be added - for example, hardware, software, accounting etc). What I would like to solve is.. how would I do so as to create a new department and add employees to the project i.e. how will have the tables be structured, and what tables are to be created? Steps
How can can I solve this in terms of database design? |
How to Handle TimeZone Properly in SQL SERVER? Posted: 07 Apr 2013 11:06 AM PDT I have some issue which needed to be fixed quickly. My local development server is in middle east. But my production server is in UK. Now, I need to show the date to user to thier timezone. For example, if a user is in Saudi Arabia, then I need to show the time according to Saudi Arabia format. Should I need to create a new database table called TimeZone and I will save the Time in UTC. Please suggest me/ |
MySQL format numbers with comma [closed] Posted: 07 Apr 2013 12:14 AM PDT How can I print the integer part of a number with commas separating every three digits? For example, |
How do I find an invalid utf8 character "somewhere" in my MySQL/trac database Posted: 06 Apr 2013 09:27 PM PDT I have an installation of trac, which uses MySQL. It has been upgraded so many times, moved servers etc. and chances are that the MySQL character sets were not always set correctly or consistently over the years. Currently all of them are utf8. When attempting to upgrade the data using "trac-admin wiki update", I'm getting an error message that a byte ("UnicodeDecodeError: 'utf8' codec can't decode byte 0xa0 in position 4274: invalid start byte") is not valid unicode. Unfortunately trac-admin gives me no hint where (table/row/column) to look for that byte sequence, or what I could do to fix it. My question is not about trac/trac-admin, however, it's about the database. How would you go about finding, "somewhere" in the database, the offending bytes, and replacing them with something that is at least valid utf8. I have attempted to mysqldump the database and to re-import it, but MySQL gives no indication that anything might be wrong. The invalid bytes get re-imported. Ideas? |
While restoring copy of SQL Server 2008 backup file in SQL Server 2008 R2 degraded performance Posted: 07 Apr 2013 03:47 PM PDT I am trying to upgrade our SQL Server version from SQL Server 2008 to SQL Server 2008 R2. But when I restored a SQL Server 2008 backup file in SQL Server 2008 R2, it's significantly degraded the performance of stored procedures. I took a full back up from old SQL Server 2008 and restored it in new SQL Server 2008 R2. I checked the execution plan of several stored procedures to make sure no indexes are missing, but everything is same. Can anyone please give me an advice about it if I need to do any further steps to get better performance on it? Thanks, Dony |
MySQL5.6 on Mac OS X 10.6.8 problems when granting permissions to root Posted: 07 Apr 2013 04:35 PM PDT I'm having serious problems with a MySQL 5.6 instance on a Mac Server. We had to upgrade MySQL to a newer version, but it turned to be a bad idea, as we lost control to it. We had a backup of the /data directory and the my.cnf file as well. However, when setting an init_file to restore the previous password and its permissions. So we created a text file with this content: We have double checked the init_file permissions (we even gave it a chmod 777, to make sure it worked), but something is not working. When we run The problem may definitely come from the [Error] lines, but as we haven't used the --skip-locking, it's just confusing. If we try to log into mysql using |
SQL Server 2005 upgrade service pack via command line Posted: 06 Apr 2013 11:01 PM PDT I have been wracking my brain over upgrading sql server 2005 to sql server 2005 sp4. I have a script for installing new instances of sql servers for all versions and they all work wonderfully. Problem is, sql server 2012 can't upgrade sql 2005 SP3 and below. So, I have to install up to sql 2005 SP4, AND THEN upgrade through sql 2012, which is highly annoying. I need to do this silently via the command line, but I cannot get it to work at all. Here are some samples I tried: among a couple other variations. I could not find anything online at all. In fact, the one helpful thread ended in saying that Microsoft didn't have any support for this, but I'm not sure about that. What can be done here? Does anyone have any experience in updating service packs via command line? |
MySQL performance tuning + queries stuck on "Copying to tmp table" Posted: 07 Apr 2013 09:01 AM PDT The latter part of the question's title (queries stuck on "Copying to tmp table") has been addressed many times, and I have spent a fair amount of time researching this. I would appreciate it if you guys could help me come to a conclusion - especially with my particular server set up in mind. Quick overview of server: The setup is in no way tweaked, so current config is to some extent way off. Hopefully your scolding could provide knowledge. The web application running on the server is a Magento site with 25.000+ products. The query giving the most headache is the one generating sitemaps. Currently, the following query has been stuck for a little over an hour on "Copying to tmp table":
Relevant config: Server buffers: Per thread buffers:
The above memory limits will allow me to use 130% more RAM than is physically installed on my system. Obviously, something must change. According to the MySQLTuner Perl script, I am currently in danger of using:
The two variables that seem to affect "Copying to tmp table" the most are: Mine are both set to 0.25G
There are two suggested fixes that seem to get mentioned more that others:
|
how to dump a single stored procedure from a database Posted: 07 Apr 2013 02:01 PM PDT I need to create a dump file that contains a single stored procedure from a database. Not all routines from that database |
How to find when last reindexing happened in sql server? Posted: 07 Apr 2013 04:01 AM PDT I have set 'job' for re-indexing, I want to know when the last re-indexing happened in datetime. |
Deriving formulas for input/output Posted: 07 Apr 2013 08:01 PM PDT I'm currently enrolled in a DBS class and am having problem with an assignment. I've searched around and have been unable to understand what it is I'm meant to be doing with this derivation formula.
I've been using some software that was given with the assignment and it also asks what are the maximum number of blocks that are allowed and that is not given by the above brief. I'm not really sure how to derive a formula for this. I've assumed that because there are 3 records per block there are 4 blocks required and that a random heap file uses 1 disk i/o per write/read. If this is a larger topic than is worth explaining a link to a reliable few pages is also helpful. |
innobackupex is failing while exporting backup Posted: 07 Apr 2013 03:01 AM PDT I am using perl script which is working fine in one of my other box which used to take individual schema backups & finally take all schema together using percona innobackupex. I have following information in the Log(posting One day Log details): Full details are in /apps/dbbackup/backup.log. Named pipes are existing in the /tmp even after backup getting failed : Any idea, why the backup is failing? |
Trying to create PostGIS database Posted: 07 Apr 2013 05:34 AM PDT I am trying to create a spatially enabled PostGIS database. I am following the PostGIS documentation, http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2648455. In the short version, i executed, But I did not execute the last three commands, Is my database still spatially enabled? If not, then can you tell me where these .sql files are located so I can execute those last commands, since I am getting the following error, I am using Ubuntu 12.04 |
Same field but different contents Posted: 07 Apr 2013 01:01 AM PDT I'm building a database for a divination system. Just to make it easy, I'll explain it in terms of the i ching. Every element of a hexagram is a different table. There's one for yin and yang, one for the 3 positions in a trigram, one for the trigrams, one for the hexagrams. There's also a table for the correspondences, which is linked to each of the other tables - correspondences for yin or yang, for the 3 positions, the trigrams, and the hexagrams. There is also a table with commentary, which also links to each of the other tables (except for the correspondence table). So, the table for the trigrams, for example, might be structured like this: With data like: The Correspondence table looks something like this (I know that all my I Ching data's wrong...) The idea is that the same correspondences are required for every table, so the correspondence table would have an entry for each of the other tables. CorrespondencesIDs 1 through 4 might apply to the YinYang table, for example (Old and New Yin, old and new Yang), and then 5 through 13 to each of the trigrams, and so on. It seems like this would work just right. On the other hand, it feels intuitively like I'm doing something wrong and breaking some rules. Since every entry on the correspondence table will be different, it seems like there should maybe just be similar entries on every table: and then and so on. What is the smart / best way to structure the database? Apologies if this is a dumb question - I'm new to database design, and some of these concepts still confuse the heck out of me. |
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