Using SMO to get create script for table defaults

I'm trying to create a database scripter tool for a local database I'm using. I've been able to generate create scripts for the tables, primary keys, indexes, and foreign keys, but I can't find...

PostgreSQL LIKE query performance variations

I have been seeing quite a large variation in response times regarding LIKE queries to a particular table in my database. Sometimes I will get results within 200-400 ms (very acceptable) but other...

How to call a stored procedure from Java and JPA

I am writing a simple web application to call a stored procedure and retrieve some data. Its a very simple application, which interacts with client's database. We pass employee id and company id...

ToList slow performance vs foreach slow performance

I am building program that use DataBase with 3 tables(Worker, Task, TaskStep) and i have a method that get date and build report for specific worker of the task and there steps for the specific...

org.apache.solr.common.SolrException: Document is missing mandatory uniqueKey field: id

While indexing a MySQL database table with Apache Solr, I received the following error: org.apache.solr.common.SolrException: Document is missing mandatory uniqueKey field: id What does this...

How big is too big for a PostgreSQL table?

I'm working on the design for a RoR project for my company, and our development team has already run into a bit of a debate about the design, specifically the database. We have a model called...

MySQL Optimization - MySQL's maximum memory usage is dangerously high, but still recommending increases

I have a cPanel/CentOS 6.5 VM with 12 GB RAM. I ran the MySQLTuner script, and followed the recommendations that they gave, but it's still recommending increases, while telling me that MySQL's...

MySQL on duplicate key delete

I am looking for a (not too convoluted) solution for a MySQL problem. Say I have the following table (with a joint index on group and item): Group item nogroup item_a group_a ...

Why did SQL Server suddenly decide to use such a terrible execution plan?

Background We recently had an issue with query plans sql server was using on one of our larger tables (around 175,000,000 rows). The column and index structure of the table has not changed for 5+...

Speed Up: query with a GROUP BY

I use the query below to select actors with minumum ages of movies. SELECT production_cast.production_id, MIN(birthdate) FROM person LEFT JOIN production_cast ON production_cast.person_id =...

How to write denormalized data in Firebase

I've read the Firebase docs on Stucturing Data. Data storage is cheap, but the user's time is not. We should optimize for get operations, and write in multiple places. So then I might store a list...

IndexedDB - What is Key, keyPath and indexName?

I am coming from MySQL and I am used to the conventional database table scheme. I am having trouble understanding IndexedDB and some of its terminology. I looked up these definitions in the...

php mysql filtered pagination results doesn't work on next pages

Good day. I need your expert input. I've been working on with pagination with filtered results from mysql. The filtered results only works on the first page. Clicking on the next or succeeding...

Returning all rows of a column from my content provider

I'm trying to access a Content Provider I already made (which I made by very closely following a tutorial, I've tested it with the code the tutorial walked me through and it works fine) and read...

Why does Redshift not need materialized views or indexes?

In the Redshift FAQ under Q: How does the performance of Amazon Redshift compare to most traditional databases for data warehousing and analytics? It says the following: Advanced Compression:...

Mongo/mongoose schema is being cached somewhere

var UserSchema = new Schema({ "username": {type: String, unique: true }, "password": String, }) so I changed the property name to username, and ever since then things have been going...

SQL developer refine connections view

I searched about this on google and so, but could not find a solution: I am working on Oracle SQL developer using multiple schemas and database connections. Lets say i have connection 1 which has...

SQL/DB2 SQLSTATE=23505 error when executing an UPDATE statement

I am getting a SQLSTATE=23505 error when I execute the following DB2 statement: update SEOURLKEYWORD set URLKEYWORD = REPLACE(URLKEYWORD, '/', '-') where STOREENT_ID = 10701 and URLKEYWORD like...

Sequelize - Rename column with index & constraint

I want create migration with Sequelize to rename column with camelCase to have a database with column in snake_case. I use Sequelize to create migration and use migration. module.exports = { ...

DBLINK vs Postgres_FDW, which one may provide better performance?

I have a use case to distribute data across many databases on many servers, all in postgres tables. From any given server/db, I may need to query another server/db. The queries are quite basic,...

Building SQL Server Database Project In Ubuntu

I'm building an ASP.NET Core 2.0 Web API application that is hosted in an Ubuntu environment. So far, I've had great success getting things building and running (for the .NET Core app) in...

df.append() is not appending to the DataFrame

I formulated this question about adding rows WITH index, but it is not yet clear to me how/why this happens when there are no...

MySQL Indexes: Why does multi-column index perform worse than single column index?

I am learning about indexes and I thought I'd try an experiment using the MySQL Sakila database. I have the following query: SELECT title, release_year FROM film WHERE release_year < 2010 AND...

Using S3 as a database vs. database (e.g. MongoDB)

Due to simple setup and low costs I am considering using AWS S3 bucket instead of a NoSQL database to save simple user settings as a JSON (around 30 documents). I researched the following...

Cycle in models in Entity framework core

Imagine these models are a part of a social network application. User can make a Group and can add other users in it(as members) and a user can be a member of the group. I'm using .net core and...

Global nonpartitioned index in Oracle

I am reading up documentation for oracle partitioned indexes. One can find everywhere the distinction between local partitioned index and global partitioned index and that is clear to me. I am...

mysql workbench No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar

I'm learn sql for web design. I am using MySql WorkBench, as stated in the title I'm wondering if there something in sql code is missing. Given error: 14:59:45 CREATE TABLE branch ( branch_id...

JPA and BigInteger fails

I'm trying to store a SHA256 hash as a numerical value, which seems like the optimal way to do it from a space and indexing POV. I'm using JPA with a simple field definition: @NonNull private...

Sequelize.sync: Create indexes when table does not exist

According to documentation sequelize.sync() without {force: true} or {alter:true} is supposed to ignore already existing tables and create/sync only new ones. But there are at least two use cases...

Why does Postgres VACUUM FULL ANALYZE gives performance boost but VACUUM ANALYZE does not

I have a large database with the largest tables having more than 30 million records. The database server is a dedicated server with 64 cores, 128 GB RAM running ubuntu and postgres 12. So the...