Most Popular
1500 questions
22
votes
3 answers
Can I retrieve all database objects owned by a particular user?
We have a user who is leaving and I need to know every database object that he owns. Is there a query that will provide this information?
JHFB
- 2,854
- 6
- 37
- 64
22
votes
3 answers
What's the difference between POINT(X,Y) and GeomFromText("POINT(X Y)")?
I'd like to store some geometric positions in my MySQL database. For this I use the POINT datatype. Almost everywhere I read that the function GeomFromText should be used to insert data in the table.
However, I found out that POINT(X,Y) also works.…
ComSubVie
- 323
- 1
- 2
- 6
22
votes
1 answer
Why does SQL Server 2012 Express use 9.5GB of RAM on my server?
I am building an application in which I plan to embed SQL Server 2012 Express as the primary datastore. When testing on my development machine (Win7-32 with 3GB RAM), I never observed the sqlservr.exe process to use more than 1GB of RAM as I would…
Dan
- 535
- 2
- 6
- 14
22
votes
1 answer
How soon after updating expire_logs_days param and restarting sql will old binlogs get deleted?
MySQL 5.1.x | InnoDB | Windows
My mysql data directory is starting to fill up with bin logs.
I currently have the following settings configured in my windows mysql server:…
Mike B
- 607
- 3
- 10
- 17
22
votes
1 answer
Does mysqldump export indices, by default?
I played around a little with mysqldump and I was wondering, if it does export indices (FULLTEXT, INDEX,...) by default. I read up on it and I found this option:
--disable-keys, -K
which suggests, that it actually does export the indices. But I…
Aufwind
- 377
- 2
- 3
- 8
22
votes
2 answers
What is the modern way to partition PostgreSQL across machines, when the data is "naturally partitionable"
After several years of dwelling into the "NoSQL" space, now I have a problem that is quite "relational" in its nature.
Today I see data stores with quite different eyes than before. Things like Riak have spoiled me in a way that I can no more…
loxs
- 321
- 2
- 5
22
votes
3 answers
Pivot rows into multiple columns
I have a SQL Server instance that has a linked server to an Oracle server. There is a table on the Oracle server called PersonOptions which contains the following data:
╔══════════╦══════════╗
║ PersonID ║ OptionID ║
╠══════════╬══════════╣
║ …
NotMe
- 887
- 3
- 10
- 19
22
votes
1 answer
What exactly are iblog files in mysql
I would like to understand these ibdata files as these play vital role in the crash recovery procedure. I could not find proper resources over the web for this.
Uday
- 814
- 3
- 13
- 27
22
votes
1 answer
When should extended events be used instead of SQL Profiler/perfmon?
The extended events seem like a better technology and less stress on the server, but the SQL Profiler/perfmon has better tooling. Also the extended events seem to have a steeper learning curve. In which context should each be used? Is it worth…
Michael Hedgpeth
- 1,361
- 4
- 15
- 21
22
votes
1 answer
In SQL Server, why can a backward scan of clustered index cannot not use parallelism?
I've been reading about SQL Server internals and every book or blog mentions this about backward scans.
A backward scan of a clustered index cannot use parallelism
The only post that said something is this one below. The post says that the SQL…
Kishan Dasari
- 329
- 1
- 4
22
votes
4 answers
SQL Server has encountered occurences of I/O requests taking longer than 15 seconds
On Production SQL Server, we have following config:
3 Dell PowerEdge R630 servers, combined into Availability Group
All 3 are connected to a single Dell SAN storage unit which is a RAID array
From time to time, on PRIMARY we are seeing messages…
Aleksey Vitsko
- 5,589
- 5
- 34
- 64
22
votes
4 answers
How do I get the current and next greater value in one select?
I have a InnoDB table 'idtimes' (MySQL 5.0.22-log)
with columns
`id` int(11) NOT NULL,
`time` int(20) NOT NULL, [...]
with a compound unique key
UNIQUE KEY `id_time` (`id`,`time`)
so there can be multiple timestamps per id and multiple ids per…
Martin Hennings
- 357
- 1
- 3
- 9
22
votes
4 answers
How does SQL recursion actually work?
Coming to SQL from other programming languages, the structure of a recursive query looks rather odd. Walk through it step by step, and it seems to fall apart.
Consider the following simple example:
CREATE TABLE #NUMS
(N BIGINT);
INSERT INTO…
UnLogicGuys
- 409
- 4
- 9
22
votes
3 answers
How can I generate a random bytea
I would like to be able to generate random bytea fields of arbitrary length (<1Gb) for populating test data.
What is the best way of doing this?
Jack Douglas
- 39,869
- 15
- 101
- 176
22
votes
3 answers
Safely moving and creating new tempdb files
Two things I'd like to know:
how do you safely move tempdb with minimal downtime?
how many tempdb files do you need?
Is it 1 file per core? So quad-core = 4 tempdb files, creating three new ones?
Stuart Blackler
- 4,542
- 7
- 29
- 43