The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
111 views

Why do the queries slow down after a few minutes, when trying to build a DB?

First - I am a complete newb to DBA. Please be gentle. (And I am fairly new to python as well.) Oh, and I have no idea how to change any MySQL settings or the like, so all the MySQL DB settings are ...
2
votes
1answer
238 views

SQL Server: how to troubleshoot login timeout expired error

I have a production SQL Server 2012 (SP1) running on Windows Server 2008 R2 Enterprise edition. A lot of time while connecting to this server from a remote host I to face connection timed out error. ...
1
vote
1answer
3k views

How to run DB2 export command in shell

I am trying to run the following DB2 command through the Python pyodbc module: DB2 export to C:\file.ixf of ixf select * from emp_hc I am successfully connected to the DSN using the pyodbc module in ...
-1
votes
0answers
41 views

insert performance of Mysql InnoDB vs Mongodb

I often heared that Mongodb has a better performance than mysql while mysql has more consistence than Mongodb. Then I did a experiment using the following python code based on MySQL-python and ...
1
vote
2answers
148 views

Query to Access a specfic data in the row using python

Am using wordpress and phpmyadmin for handling my database Below is the code I use to view entries on my form using python. In the form I ask users to check/uncheck specific questions. It works as ...
1
vote
0answers
15 views

Heirarchial Database with Time Tracking

Working in Python/Django 1.8 I have a problem along the following lines: Assembly Table |Part |Parent (FK to other Part) i.e.: Car |--Tire |--Bolt A |--Bolt B Journey Table |Date ...
0
votes
0answers
9 views

How to load a .dmp into PostgreSQL using pgadminIII [duplicate]

I have a dump file from oracle that I wish to load into pgSQL database. I can use psycopg2 or pgAdminIII to accomplish this. Any tutorials or references would be much appreciated as I cant seem to ...
0
votes
2answers
188 views

How to work with multiple Postgres databases in psycopg2

I have two different Postgres databases on two different servers (one is actually local). Similar to this question, I would like to work with both databases at the same time. However, I can't figure ...
0
votes
2answers
58 views

SQLAlchemy connection error with Postgres

I am trying to write a basic python script that uses SQLAlchemy to connect to my Postgres database. In the connection details, if I use "LOCALHOST", it connects fine. If I reference the server by ...
0
votes
2answers
21 views

How to add new columns to MySQL database retaining existing data?

In implementing upgrades to an existing Python application, on a development server, one MySQL table has gained an additional column but another has gained 23. What is the best way to add these to to ...
0
votes
1answer
52 views

mysql to postgresql, migrate files directly ( longblob > pg_largeobject )

I'm working on a python(2.6.6.) script and I'm evaluating what approach to take to migrate files from mysql-server to PostgreSQL . I've read the following posts: How to insert (file) data into a ...
0
votes
0answers
42 views

psycopg2 - drawbacks of reusing cursors?

I am new to Python and the psycopg2 module. context Working on a script that select data from MySQL, perform some operations (conversion of data-types and other "transformations"), and finally ...
0
votes
1answer
194 views

Scale MySQL trigger for thousands of inserts per seconds

We are using MYSQL database for an Analytics app. I have two table token and token-big (for overview of actual data) both have id(int) unix_starttime(int) unix_endtime(int) details(varchar 256) A row ...
0
votes
0answers
29 views

No foreign key constraint with PRAGMA foreign keys

This is my code. It's SQLITE3 in Python 3. conn = sqlite3.connect(db) c = conn.cursor() c.execute('BEGIN') c.execute("PRAGMA foreign_keys = ON") c.execute('CREATE TABLE ...
0
votes
1answer
33 views

plpy.execute('…') statements not in logs

How can I get the SQL statements executed by plyp into the postgres log files? CREATE FUNCTION history_monitor() RETURNS trigger LANGUAGE plpythonu AS $_$ ... plpy.execute('...') $_$; ...
1
vote
0answers
29 views

SQLite reference table question

I'm using SQLite and Python for making a sensor network database. I have a table holding the nodes: NODE, another 2 tables for sensor specification: SENSOR_TYPE ("Temperature, Humidity...) and ...
2
votes
2answers
490 views

Using AWS DynamoDB Geospatial index with Python

Amazon's AWS DynamoDB features Geospatial Indexing, which facilitates geo queries: Query Support: Box queries return items that fall within a pair of geo points that define a rectangle as ...
7
votes
2answers
1k views

How to best use connection pooling in SQLAlchemy for PgBouncer transaction-level pooling?

Using SQLAlchemy to query a PostgreSQL database behind PgBouncer, using transaction-level pooling. What is the best pattern to use for this kind of set up? Should I have one-engine-per-process, ...
1
vote
1answer
58 views

How do long string field names affect MongoDB database size?

I am using MongoDB and the names of my fields are strings with 10-20 characters. A typical document consists of 30.000 columns filled mostly with floats, like 1.2, 10.5, 2.55. It's size is 1MB. Do ...
1
vote
1answer
36 views

Looking for simple contains method when searching text in postgresql

Im new to the PostgreSQL world so I do apologize in advance for not knowing if there is an obvious answer to these questions. Basically I'm looking for two things. First a simple "contains" based ...
0
votes
1answer
59 views

MySQL – Backup/Restore Selected Tables/Fields Only

I support a Python application (includes some C modules) that utilises a MySQL database. A number of clients are running this in a standalone environment but have agreed that we can use their data ...
0
votes
1answer
3k views

Launching a python script from an insert trigger [closed]

We have a nice piece of python that sends some emails and interacts with a cloud system. Works fine. But we have to fire it every few minutes to poll the db. We really need, for business purposes, to ...
1
vote
2answers
676 views

Connecting to Oracle Database with ODBC/Python

We've recently installed a new piece of software that uses an Oracle Database to store the data. My goal is to connect to that database and pull the data from the back end to do analysis on. I'm ...
3
votes
4answers
1k views

What is the best way to store X509 certificate in PostgreSQL database?

I'm working on web authenticate system where users will digitally sign random tokens and this will be checked with X509 certificates stored on the server. Therefore I have to store several X509 ...
3
votes
1answer
92 views

What exactly is Psycopg2?

This question is for a report I'm writing for school. Technically speaking, what is Psycopg2? In this tutorial they refer to it both as an "adapter" and "driver" Psycopg2 is a DB API 2.0 compliant ...
0
votes
0answers
56 views

UPSERT-ing large batches in PostgreSQL 9.3 on AWS RDS

Consider the following location updates table , which keeps the most recent location update of each car_id. The table has the following columns: car_id - a textual primary key geom - a PostGIS ...
1
vote
1answer
264 views

How to get minimum value in pyMongo

I have a collection with several fields, and I'd like to get the minimum value from one. I know a command for getting the max value: collection.find_one(sort=[("myfield", -1)])["myfield"] but not ...
0
votes
0answers
67 views

PostgreSQL becomes very slow after heavy utilization

I have built a Python web application and I am hosting it in a 2GB RAM Debian Server. My application uses PostgeSQL 9.1 with PostGIS. One of my tasks involves importing data from big csv files. ...
1
vote
0answers
11 views

Adding new sproc to the exisiting database using connectors?

The project I'm currently working on is mostly pythonic, by this reason I'll likely use mysqldb python connector or sqlalchemy. The question arose when I've tried to find out the way of adding new ...
1
vote
0answers
17 views

DBMS for working with sets [closed]

I want to simulate some stochastic system which deals a lot with small sets of integers, e.g. [0,1,5],[2,5,7,9,11]. The number of the sets is so large, and I need to look them up so often that it is ...
0
votes
0answers
69 views

Cassandra - save file

I'm new with Cassandra, and even more - I never have such task for habitual RDMS systems, like MariaDB or Oracle. So, how can I store file in to Cassandra's table? Preferably using Python-driver, but ...
0
votes
1answer
120 views

What is wrong with the following Python code — trying to insert into a database?

This works in MySQL Workbench: insert into nametest (name,surname) values('John''Krailling'); I am trying a get similar result with Pycharm with the following code: import MySQLdb db = ...
0
votes
1answer
368 views

Mysql How to insert a variable as field value in a table

I have created a variable named hash as a password hash. How can this variable be inserted a a field value in a table? hash = pbkdf2_sha256.encrypt("password", rounds=200000, salt_size=16) ...
3
votes
0answers
2k views

DB2 Query Error SQL0204N Even With The Schema Defined

I'm using Python to access tables in DB2 10.1.0 I have a login account named foobar and a schema with the same name. I have a table named users under the schema. When I'm logged in as foobar, I can ...
1
vote
2answers
102 views

Mysql date_add returns wrong row in python, right row in phpmyadmin [closed]

I am trying to get the first and last record from a month. In phpmyadmin I ge the correct result. In python I don't. In fact python returns the same row for both of these queries. First number is ...
1
vote
0answers
394 views

Creating Pandas DataFrame on Python From a MongoDB Document containing Embedded documents

I am working on a machine learning algorithm on python's scikit.learn, but this time the data are in Mongodb documents format. I would like to pull my data into a dataframe. Here is an exemple of the ...
0
votes
0answers
81 views

New Table vs Java Beans to allow user to dynamically change data representation?

I am building a database to store the assessment records of students, along with other relevant information and functionality like reporting on average scores etc. Currently my company uses Excel for ...
0
votes
1answer
399 views

Easy way to automate database synchronization

I have to get data from a remote database and store it in my local database. And mapping between the two database is something like shown in the below image. So, for this I'm looking for a Python ...
0
votes
0answers
29 views

Data base design for handling website subscriptions

I have a website where at least 20 posts are posted in a day and each post contains more than 5 categories and each category has further tags. I wanted to build a subscription module that users can ...
0
votes
1answer
340 views

Concurrent SELECT and UPDATE in multiprocessing python

I have to randomly match about 20 million rows in two tables without using the same row twice using PostgreSQL 9.3.5. Both tables have the following structure CREATE TABLE de_sim_points_end ( -- ...
0
votes
0answers
73 views

MongoDB stops responding after 2 days of working

I've written small application in Python (I used Twisted). Program receives data and writes it to MongoDB. Every 2 days MongoDB stops responding: 2015-02-11T10:47:20.918+0100 [initandlisten] can't ...
0
votes
0answers
67 views

MongoDB GridFS delete operation too slow while mongod process takes up 100% CPU

I'm using Python (CPython 2.7.3 on Debian 7.8 amd64) with pymongo driver (version 2.7.2) to connect to a MongoDB (db version v2.4.12) database which has solely been used to store files in a GridFS ...
1
vote
1answer
900 views

How to take backups of MySQL databases, explicitly based on PyMySQL

I am looking for a purely Python solution to take backups of every MySQL database on localhost. I already use PyMySQL to run queries on these databases. Any help is highly appreciated. EDIT After ...
0
votes
0answers
239 views

mongodb configuration issue

I am editing the configuration of running mongodb in an 'amazon ubuntu instance' (with more than 30 GB data), and I attached some volumes for data, log, and journal I followed mongodb-ec2: ...
1
vote
0answers
285 views

Migrate from SQLite to MySQL (then back)

For various reasons, I must use a SQLite database with a local application. However, I wrote a Flask app that enables users to more easily classify items in the database, and it runs very slow on ...
0
votes
0answers
156 views

Storing DB credentials in an application source code?

I am making an app which connects to a DB, and the app will have plenty different userslogins. Is it a good design choice to have a specific DB login/password for the application, using which the ...
0
votes
1answer
32 views

Useful guide & FAQ for Application+SQL [closed]

Of course when you are making your first application for fun it doesn't matter that much how you deal with things. But when you need everything to be up to the current standards you don't always know ...
2
votes
0answers
351 views

MongoDB communication issues on Azure

I have a Python uWSGI app running behind Nginx using pymongo to communicate with a 4 machine replica set running Mongodb 2.6.3. The replica set is configured using domain names for each machine ...
1
vote
2answers
468 views

What is better? Delete and insert or update? [closed]

I have a python script in which I have to update a column in 67000 rows. The value of the desired column can be unique for each row. I found that inserting 67000 rows takes about 5 seconds but ...
-3
votes
1answer
402 views

i want use the best database for my python 3.4 and django which is the best database that fit with this [closed]

i want use the best database for my python 3.4 and django which is the best database that fit with this