[how to] Get the Time of Last update of a column |
- Get the Time of Last update of a column
- MySQL design for big data
- What is the best way to create database table? [on hold]
- How to select rows which have max and min of count?
- Difference between partitioning and fragmentation
- MariaDB header error
- How to manage constants within an Oracle Database
- database structure - complicated requirements
- When creating remote BLOB store is "RBSFilestreamFile" always the name of the file to be added to the FILEGROUP?
- What is proper database design for a drupal table with an order field?
- what is the best way to update 2 tables via data entry form in access 2007 database?
- SQL Server Replication: "ALTER TABLE ALTER COLUMN" is not propagated to subscribers
- Is it possible to have extra tables in a Slave with MySQL Replication
- What fillfactor for caching table?
- Replication issue - CREATE SELECT alternative?
- Which text-index I should create for xooops engine to achieve better search results?
- How to drop a DB2 instance when the instance owner was removed
- Postgresql could not find pg_xlog
- Mongo replicated shard member not able to recover, stuck in STARTUP2 mode
- Ensure correct username when using pg_restore
- Can I monitor the progress of importing a large .sql file in sqlite3 using zenity --progress?
- What's the difference between a temp table and table variable in SQL Server?
Get the Time of Last update of a column Posted: 29 Jun 2013 08:38 PM PDT Good evening, This command gives the date of the last update for a table But I want to find the time of last update of a particular column of a table. I can't use triggers because I want to know the time of last update of a specific column from a system table. I hope I explained well my problem. Thanks |
Posted: 29 Jun 2013 12:19 PM PDT this is my first post on this forum although i have been following it for a while. Here's my question and i really need help about this one. I have a database witch contains trip services. every trip service has 30 fields of data and GPS position logs of vehicle movement and asterisk call logs, receipts etc. With my calculation over 1 year period database size would be at least 2.3 TB. Needles to say that querying needs to go in many-2-many fashion and all data needs to be available within seconds and i need to have it at disposal for at least 3 years. In future there will be around 2000 queries per second generating about 4000 records per seconds within approximate of 6000 fields and also approximate of 1000 - 2000 updates and 4000 SELECT operations. My question is : what is the bast practice to keep my database responsive and effective and what hardware is most suitable for that kind of demands. I have read the normalization article and i understand what is the goal. Hardware that i am planning to get is as follows ( HP Prolliant running centOS): CPU : 2 x Intel Xeon Processor E5-2620 RAM : 48 GB HDD : 8 x HP 300 GB 6G SAS 15K rpm SFF (2.5-inch) Network : 4 x Gigabit Thanks in advance, best regards |
What is the best way to create database table? [on hold] Posted: 29 Jun 2013 08:04 AM PDT I am developing a web-application almost similar to cardekho or carwale. Like these website, my application also contains full details of car such as My question is what is the best practice to create database table. What I have concluded yet is I will create different tables for |
How to select rows which have max and min of count? Posted: 29 Jun 2013 01:18 PM PDT I have the following table in SQL Server 2012: I want to output a table of the form For example, if I have What sort of query would output this information? |
Difference between partitioning and fragmentation Posted: 29 Jun 2013 05:47 AM PDT Im trying to learn sth. about distributed databases and i stumbled upon the concepts of fragmentation and partitioning. Now im asking myself: whats the difference? It seems to me as if both do the same thing producing the similar results (deviding a relation horizontally/vertically/both)... |
Posted: 29 Jun 2013 03:55 PM PDT I had a MySQL server on my Ubuntu dev box (I use a tutorial "how to install a lamp on ubuntu" type of article) and I decided to install mariadb. So I uninstall mysql and install mariadb. The installation worked fine, all my database worked fine except I get this error when I run the code:
this is my php code: and the mysql info: I tried a mysql_upgrade: As far as I know everything there is ok. What's the problem? Also, is MariaDB ready for production? |
How to manage constants within an Oracle Database Posted: 29 Jun 2013 09:17 AM PDT This question touches on a few different parts of Oracle that I'm not particularly familiar with so bear with me: I am trying to redesign some of the procedures and functions within the database I manage. One of the most annoying things is the use of integers to express the status of rows. For example rows that need to be processed get the number 3, rows that have been processed get the number 0 and rows that are in the middle of processing get number 1. This is a simplified example. What I was hoping to do was code those integers into constants so when the procedures are written the words would be self-documenting... I've tried to use packages and functions to manage these constants. Everything comes out a bit messy. The cleanest I've found is: This allows you to type the sql below which looks relatively neat. The problem I've found is that these columns are indexed to return quickly but the functions mean the indexes aren't used. With that background my question is: How should constants be managed in Oracle effectively? What solution has the best trade off for visual simplicity, logical organisation and database performance. |
database structure - complicated requirements Posted: 29 Jun 2013 04:45 AM PDT I have a project to build a website but it's complicated and I'm having trouble figuring out what the best way to build the database would be to handle these particular requirements. The site is for a local builders and farmers (and anyone else who uses heavy equipment) to rent their machinery amongst themselves. Users should be able to sign up and list an item of equipment which is then searchable and bookable by other users of the site. So a builder might sign-up and upload a listing for his concrete mixer. Then another user can search for concrete mixers to hire between 2 dates and place a booking for the mixer through the site. So far so good. Problem is that the builder should be able to set a default per-day rate but they should also be able to say that through-out the month of July, or on the last two weekends in August the mixers default daily rate is different. So basically everyday could end up having a different rate and I'm having trouble figuring out what is the most efficient way to structuring the database and how to calculate the total costs of renting for several days if there's potentially a different rate every day. At the moment I'm imaging having to loop through a 365 sized array but that can't be right. I'm a bit new to this so I'm probably just confused. |
Posted: 29 Jun 2013 04:45 PM PDT When creating a remote BLOB store in SQL Server (2008 R2) is "RBSFilestreamFile" always the name of the file when adding it to the FILEGROUP like in this query (this is the name I've seen used in every example I've found online, but I need to know for sure)? I'm asking because I'm working on an application for restoring SharePoint content databases and need to know if I can hardcode this string into the application. I know you can create file groups and files with any name you want, but specifically for setting up RBS with SharePoint using SQL 2008's built in FILESTREAM provider are these names an expected convention? i.e. Will it work if I name my FILEGROUP and/or FILE something else? |
What is proper database design for a drupal table with an order field? Posted: 29 Jun 2013 01:45 AM PDT I am adding a custom widget to an instance of Drupal 6.x & MySQL 5.5 and came across a problem with updating rows. I have a table of recipe ingredients where multiple ingredients are tied to a single recipe by node id (nid) & version id (vid). The primary key is vid, nid & order. The vid & nid are related to the recipe nid & vid fields. The table schema is: The problem comes when attempting to reorder the ingredients. For instance: I want to move Thyme to the top of the list but I can't change the order for Thyme to 1 since that primay key already exists (Chicken). I can't move Chicken down to order 2 because Rice is already there, etc... My position is that we should add a unique auto-incrementing int field that will be the sole primary key. Which will enable us to reorder the rows without incident with the possibility that two rows might end up with the same nid, vid, & order. My coworkers position was that to add a unique auto-increment int field is bad design because there should never be two different rows that have the same vid, nid & order. But following this belief there are two ways to implement a reorder of the rows
From the database's perspective, what is the correct approach? |
what is the best way to update 2 tables via data entry form in access 2007 database? Posted: 29 Jun 2013 02:45 AM PDT I have a database with more than 500.000 records, I use Table_a to Accession the files by the ID number,and Name, Date, Address, Tel, ..... And then i use Table_b to archive files and get the position where i should keep that file, just by entering the ID. Is there any way to update the Database to have it all in one action? I mean after Accessioning the file, i may have a check box, or a drop list to move this record directly to the Archiving at the sametime?? |
SQL Server Replication: "ALTER TABLE ALTER COLUMN" is not propagated to subscribers Posted: 29 Jun 2013 07:45 AM PDT We are running SQL Server 2008 R2 SP1 as publisher & distributor, and SQL Server 2005 SP3 as subscriber. The replication of schema changes is activated, and the replication has been running for years, including frequent schema changes (new column, new constraints, etc). The following instruction was sent on the publisher: where field The query ran without errors on the main database. The result is the following:
Any idea on what is going on with this database? Publisher: object browser window vs property window give incoherent data |
Is it possible to have extra tables in a Slave with MySQL Replication Posted: 29 Jun 2013 01:45 PM PDT As my title mention I have a Master and a Slave database. Master if for operations data and my slave mainly for reporting stuff. The issue is that I need to create extra tables on reporting that can't be on the master, but the way my replication is set (the simplest one mentioned by the official doc) at the moment, this breaks the replication system. How could I add tables on the Slave without Master caring about it ? Is it even possible ? |
What fillfactor for caching table? Posted: 29 Jun 2013 06:14 AM PDT I have heavily updated / accessed table where I store serialized java objects. They are in the table for 2-3 hours (also are being updated during that period) and then removed. Size of table is around 300MB. I have spotted it is very, very often VACUUMed and wonder if changing the |
Replication issue - CREATE SELECT alternative? Posted: 29 Jun 2013 03:45 PM PDT I've an MySQL 5.1 slave for our BI team. They need to make some CREATE SELECT with big select queries (several million lines). As CREATE SELECT is a DDL, if the replication attempts to update some rows in same tables than the SELECT statement, replication is blocked until the freeing of the CREATE SELECT. Do you now a good non-blocking alternative to thoses CREATE SELECT statements? I thought to an SELECT INTO OUTPUT FILE then LOAD DATA INFILE but they will fill out our disks as BI guys like to do... :) Max. |
Which text-index I should create for xooops engine to achieve better search results? Posted: 29 Jun 2013 09:45 AM PDT In one of projects we use xoops engine to manage content. In mysql I can't change them as It would involve changing the engine which is not an option atm. But I can help the engine to search faster. As I understood as the table uses MyIsam engine I can create text indicies which should make search faster, am I right? So in general for which indicies I should create to avoid following queries run for long time? |
How to drop a DB2 instance when the instance owner was removed Posted: 29 Jun 2013 10:45 AM PDT This is a real sticky situation. I was handed over a machine (running an AIX 7.1), and my first task was to re-install DB2 server on it. But someone before me had conveniently removed an instance owner account, and probably recreated it. Now, the problem is this: 1) When I try to uninstall DB2, it says the instance is active and has to be dropped first. 2) When I try to drop this instance, DB2 says there is no such instance. I am quite new to DB2 administration. Not sure how to proceed here. Any help is appreciated Thanks |
Postgresql could not find pg_xlog Posted: 29 Jun 2013 08:20 PM PDT I'm trying to mount the WAL to a different disk. I stopped the server, and did the following: (I'm using Fabric) PG Log Ls ls fixed pg_xlog to point to correct place |
Mongo replicated shard member not able to recover, stuck in STARTUP2 mode Posted: 29 Jun 2013 03:45 AM PDT I have following setup for a sharded replica set in Amazon VPC: mongo1: 8G RAM Duo core (Primary) mongo2: 8G RAM Duo core (Secondary) mongo3: 4G RAM (Arbiter) Mongo1 is the primary member in the replica set with a 2 shard setup: Mongo2 is the secondary member in the replica set, mirrors mongo1 exactly: Then for some reason, the 27001 process on mongo2 experienced a crash due to out of memory (cause unknown) last week. When I discovered the issue (the application still works getting data from the primary) and restarted the 27001 process, it was too late to catch up with the shard1 on mongo1. So I followed 10gen's recommendation:
However it's 24+ hours now, the node is still in It would appear most of the data from primary was replicated, but not all. The logs shows some error but I don't know if it's related: Mon Oct 29 19:39:59 [TTLMonitor] assertion 13436 not master or secondary; cannot currently read from this replSet member ns:config.system.indexes query:{ expireAfterSeconds: { $exists: true } } Mon Oct 29 19:39:59 [TTLMonitor] problem detected during query over config.system.indexes : { $err: "not master or secondary; cannot currently read from this replSet member", code: 13436 } Mon Oct 29 19:39:59 [TTLMonitor] ERROR: error processing ttl for db: config 10065 invalid parameter: expected an object () Mon Oct 29 19:39:59 [TTLMonitor] assertion 13436 not master or secondary; cannot currently read from this replSet member ns:gf2.system.indexes query:{ expireAfterSeconds: { $exists: true } } Mon Oct 29 19:39:59 [TTLMonitor] problem detected during query over gf2.system.indexes : { $err: "not master or secondary; cannot currently read from this replSet member", code: 13436 } Mon Oct 29 19:39:59 [TTLMonitor] ERROR: error processing ttl for db: gf2 10065 invalid parameter: expected an object () Mon Oct 29 19:39:59 [TTLMonitor] assertion 13436 not master or secondary; cannot currently read from this replSet member ns:kombu_default.system.indexes query:{ expireAfterSeconds: { $exists: true } } Mon Oct 29 19:39:59 [TTLMonitor] problem detected during query over kombu_default.system.indexes : { $err: "not master or secondary; cannot currently read from this replSet member", code: 13436 } Mon Oct 29 19:39:59 [TTLMonitor] ERROR: error processing ttl for db: kombu_default 10065 invalid parameter: expected an object () Everything on primary appeared to be fine. No errors in the log. I tried the steps twice, one with the mongo config server running and one with mongo config server down, both are same results. This is a production setup and I really need to get the replica set back up working, any help is much much appreciated. |
Ensure correct username when using pg_restore Posted: 29 Jun 2013 08:45 AM PDT I have just installed postgres 9.1.6 on a local Ubuntu server. Now I'm trying to restore a database dump from a database on Heroku. The local database is setup like this: Now, when I try to restore the the dump I use the following command: Now in psql with As you can see, the ownership of app_production database has now turned from app_user to postgres. I would have expected the owner of the app_production database to still be app_user, so what am I doing wrong? BTW, The
Another thing is, that the owner of the dump is the user that the database was having on heroku, which would be something like |
Can I monitor the progress of importing a large .sql file in sqlite3 using zenity --progress? Posted: 29 Jun 2013 05:45 PM PDT I'm trying to monitor the progress of a sqlite3 command importing a large .sql file into a database using I've tried the following which will import the file, however progress is not shown: I know I need to provide Can anyone help me? |
What's the difference between a temp table and table variable in SQL Server? Posted: 29 Jun 2013 01:48 PM PDT This seems to be an area with quite a few myths and conflicting views. So what is the difference between a table variable and a local temporary table in SQL Server? |
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 |
Upcoming cars and bikes in strollernew.com
ReplyDeleteGreat! this is an information sharing article. Nice content in your blog.Car Modification in Delhi
ReplyDelete