Most Popular

1500 questions
23
votes
2 answers

Do triggers compile each time?

We are troubleshooting a server that has high CPU utilization. After finding that the queries weren't really causing it, we started looking into compilations. Performance Monitor is showing less than 50 Compilations/sec and less than 15…
Tara Kizer
  • 5,956
  • 1
  • 15
  • 28
23
votes
3 answers

Postgres Listen/Notify As Message Queue

Is there any way to use Postgres Listen/Notify feature to deliver a message to a channel and have only one listener consume this message? The purpose for this is that I have multiple 'worker' apps all listening to the same Postgres channel. But I…
moesef
  • 331
  • 1
  • 2
  • 4
23
votes
6 answers

Is there any good tool for making Database Design and Prototypes?

I would like to have a good tool for designing the Database Schema with all the tables, columns, data types and relations. Today I mostly do this with pen and paper but I would like to do it in a good design tool. Is there any good (and maybe free)…
Jonas
  • 32,975
  • 27
  • 61
  • 64
23
votes
7 answers

The operating system returned error 21 (The device is not ready.)

Every time I reboot Windows, for some databases I get this error: The operating system returned error 21(The device is not ready.) I checked the disk with chkdsk /r - no bad sectors. I executed DBCC CHECKDB with no errors: *(CHECKDB found 0…
Max
  • 471
  • 1
  • 4
  • 9
23
votes
1 answer

InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT

I am working with mysql version 5.7.14 (homebrew installation on OS X El Capitan). My system did not shutdown properly while the mysql was running and after rebooting when i try starting the mysql daemon i am getting the below…
Dushyant Sabharwal
  • 391
  • 1
  • 3
  • 7
23
votes
5 answers

Why are periodic restarts required to keep my instance performing well?

We've got a production DB server on SQL 2005. Everything runs normally for a while, but after a couple weeks we see a notable performance drop. Only restarting SQL Server brings performance back to normal. Some background: Running over 1200…
PaulJ
  • 331
  • 1
  • 2
  • 6
23
votes
3 answers

How to add a Default constraint while creating a table? SQL Server

I am trying to create a new table with columns followed by their constraint as shown below. Create tblTest( columns.. .. .. Gender int, Constraint DF_tblTest_Gender Default 3 For Gender, .. .. .. ) However, I am getting an error message near the…
Dhruv Raj
  • 231
  • 1
  • 2
  • 3
23
votes
3 answers

Update request using table alias

Executing this request: update table t1 set t1.column = 0 where t1.column2 = 1234 Getting this error: column "t1" of relation "table" does not exist This request runs fine in MySQL. Why do I get this error in PostgreSQL?
justesting
  • 333
  • 1
  • 2
  • 5
23
votes
7 answers

How to convert a MySQL database to PostgreSQL?

Is there any command line tool for converting the MySQL database to PostgreSQL? I'd also like to know if there is a way to convert the database using the normal mysqldump command.
Mughil
  • 493
  • 3
  • 7
  • 10
23
votes
2 answers

Storing prices in SQLite, what data-type to use?

I am using SQLite and need to store prices. SQLite's REAL data-type says it uses floating-point which is unacceptable storage for prices. Is there a data-type besides TEXT that I can use to store prices numerically so they sort correctly?
unixman83
  • 333
  • 1
  • 2
  • 6
23
votes
6 answers

Needing A Database Design Book

I am designing a database and it has so many relationships among my tables and i need a book that teaches database design very well.I am looking for a book where table relationships simple and complex has been covered extensively and maybe case…
Gandalf
  • 295
  • 5
  • 12
23
votes
2 answers

Using MAX text or more specific, smaller type

Someone was reviewing my DDL code for creating tables and suggested, when they saw I saw using VARCHAR(256) fields for text I expect to be pretty small, like a first name or whatever, that I should always just use VARCHAR(MAX) and linked Why use…
Phrancis
  • 1,320
  • 1
  • 7
  • 24
23
votes
2 answers

Queries without Good Enough Plan Found

I have a SQL Server 2012 database. I noticed value of Reason for early termination of statement optimization for some queries and all gave Good Enough Plan Found. Now my questions are: What are all the possible types of “Reason for early…
LCJ
  • 899
  • 2
  • 7
  • 29
23
votes
3 answers

Painless way to create a clustered index on a huge table?

So we have a customer site that is complaining about some seriously slow performance. I took one look and it's obvious that the problem is because Somebody Else (grrrr) designed a table holding some 20 million-plus records without a clustered…
Shaul Behr
  • 2,933
  • 8
  • 32
  • 41
23
votes
2 answers

Is it possible to change ENUM() lists?

I wasn't sure if changing ENUM() list isn't possible so I made a test. In MySQL v5.1.58 I made a test InnoDB table that contains one field called 'bool' of type ENUM('yes', 'no'). Then I executed... ALTER TABLE `test` CHANGE `bool` `bool` ENUM( …
Aalex Gabi
  • 333
  • 1
  • 2
  • 7