[how to] Transforming natural language to SQL [closed] |
- Transforming natural language to SQL [closed]
- Optimize multiple self-JOINs or redesign DB?
- Am I wrong in table design or wrong in selected index when made the table?
- Looking for SQL Training Options? [closed]
- HOW to "SUM" and "JOIN" for single query of a poll results?
- Linked server available to users without permissions
- unloading data from oracle dbf files [duplicate]
- Restore oracle database from DBF files [closed]
- postgres service suddenly not working after the computer crashed while working
- Unable to create a new listener in oracle 11g
- Format function returning minutes instead of months?
- How to import a text file with '|' delimited data to PostgreSQL database?
- SSIS - How do I execute a single OLE DB Command for mutiple paths?
- Does a SQL Server job run on the server or the local machine?
- SQL server 2012 upgrade causing reindexing to take a long time / fill up log file
- How to see what is cached in memory in SQL server 2008?
- Re enable Windows Authetication in SQL Server
- Configuring PostgreSQL for read performance
- Mysql Connection Pooling Similar To PostgreSQL's PgBouncer
- What's are the different ways to keep track of active and archived data?
- Database design - do I need another table?
- event scheduler not called
- How can I improve my table design for different types of an entity?
- FETCH API_CURSOR causing open transaction in tempDB
- Ubuntu 12, PostgreSQL 9.2, PostGIS 2.0
- Cannot find MySQL Server Config Wizard for MySQL 5.6 build
- Viewing MySQL Account Resource Limits
Transforming natural language to SQL [closed] Posted: 02 Jun 2013 03:33 PM PDT So i have this example. It demonstrates a technique that helps create SQL queries from natural language.I tried finding some more information on this subject, but all i found is just libraries for automation of this process. Can anyone direct me to a book or a tutorial that describes the exact step by step process ,so i could do something like that manually ? |
Optimize multiple self-JOINs or redesign DB? Posted: 02 Jun 2013 03:55 PM PDT I'm looking for advice on either optimizing multiple self-joins, or a better table/DB design. One of the tables looks as follows (relevant cols only): The With all values in a single column, self-joins seemed like the way to go. So I have experimented with various suggestions to speed those up, including indexing and creating new (temp) tables. At 9 self-joins, the query takes a little under 1 min. Beyond that, it spins forever. The new table from where the self-joins take place has only about 1,000 rows, indexed on what seem to be the relevant variables - creation takes about 0.5 sec: The I'd actually like to retrieve a few more variables, plus potentially join other tables. Now I'm wondering whether there's a way to run this more efficiently, or whether I should take an altogether different approach, such as using wide tables with indicators in different columns to avoid self-joins. |
Am I wrong in table design or wrong in selected index when made the table? Posted: 02 Jun 2013 05:08 PM PDT I've build web application as a tool to eliminate unnecessary data in peoples table, this application mainly to filter all data of peoples who valid to get an election rights. At first, it wasn't a problem when the main table still had few rows, but it is really bad (6 seconds) when the table is filled with about 200K rows (really worse because the table will be up to 6 million rows). I have table design like below, and I am doing a join with 4 tables (region table start from province, city, district and town). Each region table is related to each other with their own id: and the query like
I've tried to see the explain but no column is used as an index lookup. I believe that's the problem why the application so slow in 200K rows. The query above only shows two conditions, but the application has a feature to filter by name, place of birth, birth date, age with ranges and so on. How can I make this perform better? |
Looking for SQL Training Options? [closed] Posted: 02 Jun 2013 10:43 AM PDT I am interested in getting an entry level job working with SQL and I'm wondering if anyone has any recommendations for training programs. I am looking for something that would provide a certificate that employers would value. I'm in the age old position of no job without experience, no experience without a job. I've done some online training, but I am interested in doing something a little more in-depth that would give me some kind of credentials, but not to the extent of going through a 2 or 4 year program. |
HOW to "SUM" and "JOIN" for single query of a poll results? Posted: 02 Jun 2013 10:54 AM PDT I have a poll database as How can I run a query to sum the votes for each answer to get results for the list of answers in the poll? |
Linked server available to users without permissions Posted: 02 Jun 2013 02:08 PM PDT I have users seeing a linked server which they are not supposed to see. The linked server is defined so that only I will have access to it, but everybody can see and use it. I have created the new linked server using the following steps:
Now the only person supposed to see the linked server is me ("sa"), but somehow other users can see it and use it. Note 1: The users who can use the linked server have permissions on the remote server, they are not seeing data that they should not see, they are just able to access it from the linked server when they should not be able to. Note 2: I am the only |
unloading data from oracle dbf files [duplicate] Posted: 02 Jun 2013 10:47 AM PDT This question is an exact duplicate of: I have a list of oracle dbf files and I need to restore the information inside these files, there are no control files and anything else. only DBF file http://s9.postimg.org/mxmx0g73j/Untitled.jpg Is there any parsing tool or recovery tool that can open DBF files and unload the information in it.. |
Restore oracle database from DBF files [closed] Posted: 02 Jun 2013 05:40 AM PDT I have a list of DBF oracle files and I need to rebuild a database from these files, but I am a little newbie in oracle db administration |
postgres service suddenly not working after the computer crashed while working Posted: 02 Jun 2013 09:37 AM PDT I've been working with postgres on a linux server for the last couple of months. Last week, half of our servers crashed and my one with them. I was in the middle of uploading data to the postgres database with osm2pgsql when this happened. After we revived the server, postgres has stopped working. commands:
Starting postgresql service: [ OK ]
postmaster dead but pid file exists Trying to start the postmaster using
yields nothing either. As for the pid file, /var/run/postmaster.5432.pid exists, and when I remove it then the status changes to "postmaster is stopped", but if I try to start it again:
Starting postgresql service: [FAILED] If anyone has any idea what I could do to get it working, where the problem might be etc, I would be overjoyed to have an answer. What really gets me is that oit was working until last week, I even rebooted a backup and nothing seems to have changed, I'm really at my wuit's end with this problem! |
Unable to create a new listener in oracle 11g Posted: 02 Jun 2013 12:44 PM PDT In net manager i get an error message "A valid logfile is required" when i click on listener and choose '+' button. and then it keeps on giving me that error when i click on any other tab or button in net manager. |
Format function returning minutes instead of months? Posted: 02 Jun 2013 05:56 AM PDT While exploring the new function Output:
|
How to import a text file with '|' delimited data to PostgreSQL database? Posted: 02 Jun 2013 06:19 PM PDT I have a text file with What I am doing wrong here? |
SSIS - How do I execute a single OLE DB Command for mutiple paths? Posted: 02 Jun 2013 02:54 AM PDT I have an SSIS package (2008 R2) that I'm working on and I find myself duplicating the same OLE DB commands repeatedly and whenever there is a change its a nightmare to go back through and update all the duplicate OLE DB command tasks. Is there a way to execute a single OLE DB command for multiple paths? |
Does a SQL Server job run on the server or the local machine? Posted: 02 Jun 2013 09:38 AM PDT Does a SQL Server job always run on the server, or will it run in the context of the local machine, similar to a DTS package run from Enterprise Manager on the user's machine? The job in question calls a DTS package. The package succeeds when run locally; the job fails whether run manually or scheduled. |
SQL server 2012 upgrade causing reindexing to take a long time / fill up log file Posted: 02 Jun 2013 12:55 AM PDT I have a customer who has upgraded their SQL Server from SQL Server 2005 to SQL Server 2012. According to them, no other changes were made. They have an ERP database which does a full reindex once a week (the SQL just locates every index in the DB and rebuilds it) and it completed normally in 3 hours before the upgrade. The DB is 178GB. After the upgrade, suddenly performance tanked. They performed a reindex and it was taking several hours and before being half way finished the log file grew to close to 500 GB. They ran out of disk space, so they dumped the log and did the reindex in pieces. Would an upgrade to SQL Server 2012 change how indexes need to be rebuilt? Did something about the upgrade change the indexes? Do upgrades like this change indexes? We are going to monitor this on the next go around and see if it drops back to 3 hours or if it takes a huge amount of time and space again. Any imaginative thoughts would be appreciated as well, since I'm getting a lot of this information second hand from my customer :) |
How to see what is cached in memory in SQL server 2008? Posted: 02 Jun 2013 11:10 AM PDT Is there a way how to find out what is cached in SQL Server 2008 R2? I have found the following nice article: http://blog.sqlauthority.com/2010/06/17/sql-server-data-pages-in-buffer-pool-data-stored-in-memory-cache . However, I would like to know how much data (e.g. in percentage and KB) are stored of each table and index. Is there some simple way how to obtain such data? |
Re enable Windows Authetication in SQL Server Posted: 02 Jun 2013 05:38 PM PDT My old employee has disabled Windows Authentication in our server. Now I'm not able to access the SQL Server even though I have Administrator access to the server. I need to reset the sa password. I tried logging in using single user mode as Remus described but I get the following error:
|
Configuring PostgreSQL for read performance Posted: 02 Jun 2013 12:52 PM PDT Our system write a lots of data (kind of Big Data system). The write performance is good enough for our needs but the read performance is really too slow. The primary key (constraint) structure is similar for all our tables: timestamp(Timestamp) ; index(smallint) ; key(integer) A table can have millions of row, even billion of rows, and a read request is usually for a specific period (timestamp / index) and tag. It's common to have a query that return around 200k lines. Currently, we can read about 15k lines per second but we need to be 10 times faster. Is this possible and if so, how? Note: PostgreSQL is packaged with our software, so the hardware is different from one client to another. [Edit] Added details below, performance was better for this test because I don't have access to the real setup right now. I will update as soon as I can access the setup. [Edit2] Applied "dezso" suggestions, see configuration changes below and the specs of the server used for testing. Yes it's a VM used for testing, the VMs host is a Server 2008 R2 x64 with 24.0 GB of ram. Server Spec (Virtual Machine VMWare) postgresql.conf optimisations Table Definition QueryThe query take about 30 seconds to execute in pgAdmin3, but we would like to have the same result under 5 seconds if possible. Explain (Edit2: Updated) In my latest test, It took 7 minutes to select my data!!! See below Explain (Edit3) Thanks a lot for help!! |
Mysql Connection Pooling Similar To PostgreSQL's PgBouncer Posted: 02 Jun 2013 04:32 PM PDT I'm looking for a pooling solution for mysql that is independent of the language. I am using PGBouncer as an example because it
Is there something similiar in MySQL where I can using pooling by installing a 3rd party connector and just connect through that port? |
What's are the different ways to keep track of active and archived data? Posted: 02 Jun 2013 07:23 PM 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: I have a computer with a database on it. The database has several tables in it; one of which contains a list of users that can use the computer; and several tables for auditing (user 1 did this, user 2 did that, etc). This database is a slave of a master database in which a Content Management System is used to say, add a new user and see reports on what user did what. Example: As stated above, I have a table (lets call it users) that keeps track of all the users that are allowed to use the computer. As time goes by users will be added and removed. The problem is the audit tables keep track of a user ID so if the user is removed I lose the user information because the rows can't be joined. One idea I had was to use MySql's triggers so that if a user is added, an insert trigger is triggered and inserts a copy of the data to an 'archived' user table (lets call it users_archive). That way the computer can use users to determine if the user has permission to use it and reports can use users_archive for reports. 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 design - do I need another table? Posted: 02 Jun 2013 08:23 PM PDT I am trying to make a database that follows a form that the company uses. When a client walks in the membes of staff have to fill in a form and the data is recorded. The form on paper is 10 pages long. The first time a client is seen the entire form is filled in and the client gets a clientID. I have split the form into sections that make sense like accommodation and employment. I know I can link these tables together with the clientsID. Thats the simple part. Now when a client returns the form comes out again but this time only certain parts are filled in, what ever the clients needs are. The records for most parts don't need updating but a new record needs inserting. what would be the best way around this. So at the moment I have for example a table called client with an id and name another table called accommodation with clientid and address and another table employment with clientid and employer. But how do I go about it when a client comes in to let us know he has a new employer. I cant update the current one as that is needed but I would need to add new record for the client. Would this mean I would have to add a look up table for all my current tables? |
Posted: 02 Jun 2013 02:17 PM PDT I had created one event scheduler which looks like this This events has not called on 1st of month. So i tried so NULL in db col means that no DB is assigned to it? Please help me to solve it. |
How can I improve my table design for different types of an entity? Posted: 02 Jun 2013 06:23 PM PDT Consider an accounting system as an example. I have an Entity called Currently, I come up with the following design: But I don't think my design is efficient enough (or even correct and free of errors). What would you suggest? Also, if this is important in any way, I am planning to utilize MariaDB. |
FETCH API_CURSOR causing open transaction in tempDB Posted: 02 Jun 2013 04:00 PM PDT A select statement run from Oracle 11gR1 to SQL Server 2005 using Gateway leaves an open transaction in tempdb. The user is a datareader in Database XYZ. Not sure why the open tran is in tempDB when the statement run is SELECT. Any one had seen this issue before ? Thanks in advance sekhar |
Ubuntu 12, PostgreSQL 9.2, PostGIS 2.0 Posted: 02 Jun 2013 03:17 AM PDT At the current moment, March 4th 2013, can PostGIS2.0 be install with PostgreSQL 9.2? I checked their website and to my understanding it is not possible... I hope that's not the case. Can anyone tell me and point out the instructions on how to install PostGIS 2.0 on PostgreSQL 9.2 on Ubuntu? |
Cannot find MySQL Server Config Wizard for MySQL 5.6 build Posted: 02 Jun 2013 01:17 PM PDT Not sure if this is the right Stack Exchange site for this but... I am trying to reconfigure my mySQL instance but cannot find the config wizard. I looked here: http://dev.mysql.com/doc/refman/5.0/en/mysql-config-wizard-starting.html As one user pointed out, the config |
Viewing MySQL Account Resource Limits Posted: 02 Jun 2013 02:16 AM PDT Is there any way of viewing an account's remaining resources that are allocated to it? I setup an account that's allowed 7200 queries an hour. At any point, could I then run a query to find out how many remaining queries it's allowed? MySQL must be storing this information somewhere as Is it just not possible to retrieve that information? |
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