Most Popular

1500 questions
27
votes
1 answer

What happens if there are too many inserts in MongoDB? How to ensure all data is stored?

I use MongoDB to store periodically measured values. Every ~100 ms a bunch of values is inserted as document. It works fine, but I'm worried about performance issues. (I use safe inserts, it seems as if in PyMongo this is the default.) What happens…
lumbric
  • 373
  • 1
  • 3
  • 5
27
votes
3 answers

How to insert in a table with only an IDENTITY column?

Given a table with only an IDENTITY column, how do you insert a new row? I've tried the following: INSERT INTO TABLE (Syntax error) INSERT INTO TABLE VALUES() (Syntax error) INSERT INTO TABLE (Id) VALUES() (Syntax error) I am testing something…
Apocatastasis
  • 605
  • 2
  • 7
  • 15
27
votes
1 answer

How can I convert a string to a double precision in PostgreSQL?

How can I convert a string to a double precision in PostgreSQL ? I tried something like : update points set latitude2 = cast(latitude as double) ; where latitude is a string and latitude2 is a double. I just can't get it to work.
yazz.com
  • 509
  • 1
  • 6
  • 10
27
votes
10 answers

Any option for mysqldump to ignore databases for backup?

We have 40 databases in our server. We want to take 36 databases backup using mysqldump. How can i ignore remaining 4 databases in mysqldump command? Is there any option for mysqldump to ignore databases for backup in MySQL? I know the general…
ashuthosh
  • 707
  • 1
  • 9
  • 15
27
votes
3 answers

What is more efficient, a where clause or a join with million plus row tables?

We run a website that has 250MM rows in one table and in another table that we join it to for most queries has just under 15MM rows. Sample structures: MasterTable (Id, UserId, Created, Updated...) -- 15MM Rows DetailsTable (Id, MasterId,…
Jeremy Boyd
  • 727
  • 3
  • 7
  • 13
27
votes
3 answers

How to have a one-to-many relationship with a privileged child?

I want to have a one-to-many relationship in which for each parent, one or zero of the children is marked as a “favorite.” However, not every parent will have a child. (Think of the parents as questions on this site, children as answers, and…
cubetwo1729
  • 881
  • 4
  • 10
  • 15
27
votes
3 answers

Consistency in ACID and CAP theorem, are they the same?

From my understanding, the consistency in ACID is ensuring the data integrity. However, the consistency in CAP means the data can appear quickly in distributed system. Does that mean: they are not the same concept?
Yang Xia
  • 373
  • 1
  • 3
  • 4
27
votes
3 answers

Should a MySQL replication slave be set to read only?

I've got replication running on Percona Server 5.5 by following this guide and wondered if I should add read-only=1 to my slave's my.cnf to make it read only? The guide sets up replication for the mysql table so users are replicated but I am…
xref
  • 749
  • 2
  • 9
  • 16
27
votes
2 answers

How is the default tablespace determined when creating a table?

The Tablespace parameter is optional when creating tables. Upon execution of a CREATE TABLE statement, Oracle assigns the default one if it was not defined. In the default database there is a "USERS" tablespace. If there were several tablespaces…
Centurion
  • 895
  • 5
  • 18
  • 24
27
votes
2 answers

How to disable "Completion time:..." in SQL Server Messages window

Every query I run in SSMS append the annoying message: "Completion time:...". How can I disable that text?
user37362
27
votes
1 answer

Difference between fetched and returned tuples in postgresql

I'm facing a hard time trying to figure it out some performance problems in my database. I'm using a bunch of resources online to learn what to monitor and how to interpret that information. From the above, I'm unable to find a clear explanation of…
Rogelio Delgado
  • 273
  • 1
  • 3
  • 4
27
votes
2 answers

What is the data type 'name' in PostgreSQL

I can not find any references to the data type 'name' in the postgres documentation but I am seeing it as a data type on the pgagent.pga_jobstep table for the column 'jstdbname'. The udt_name is also 'name'. Selecting the rows from that table makes…
Arthur Putnam
  • 513
  • 2
  • 5
  • 12
27
votes
3 answers

Does the partition key also have to be part of the primary key?

I am partitioning a table based on a column that is not a primary key? I've read some conflicting information today on whether the partition column must be a part of the primary key. My gut says no, but I am not 100% sure. So questions... Must…
AngryHacker
  • 1,931
  • 5
  • 20
  • 33
27
votes
3 answers

Create a Constraint such that only one of two fields must be filled

I have a table in SQL server where the users need to enter data in either of two columns. That is, One of the two must have data inputted but at the same time i don't want to allow users to input in both columns. It's either or but one is a must.
Kevin
  • 417
  • 2
  • 5
  • 7
27
votes
1 answer

How can I force SQL Server Management Studio to update the IntelliSense cache?

IntelliSense in SSMS isn't updating unless I shut it down and restart. I've tried disconnecting from the server and reconnecting while the SSMS session is active, but that isn't working. Steps to recreate: Create a table Select something from…
Head of Catering
  • 649
  • 1
  • 10
  • 24