4
votes
2answers
36k views

Get the 2nd or 3rd occurrence of a value in a delimited string

I have the following table: ========================================================== | Name_Level_Class_Section | Phone Num | ...
1
vote
2answers
166 views

Hierarchical Structure

Every single user has say, 3 of GROUP_A, 10 GROUP_B's per GROUP_A, and 20 GROUP_C's per GROUP_B. And each of the 20 GROUP_C's involve lots of inserts/deletes... I'm not an expert, but I've done ...
5
votes
3answers
2k views

How to reduce network latency during mirroring?

We are using SQL Server 2008 R2 Standard edition for mirroring. But we found out that network latency is too high. It takes nearly four times time to complete a transaction while mirroring is active. ...
0
votes
1answer
84 views

BI and Self Service Reporting Tools that Support Web (HTML) Interface? [closed]

Hopefully a simple question. What BI tools (commercial or OSS) support self-service reporting or self-service BI via an HTML web interface? I specified HTML because I know of at least one that can ...
-3
votes
1answer
355 views

Microsoft Assessment and Planning Toolkit for Windows server 2003 [closed]

Can anyone please tell me where I can find Microsoft Assessment and Planning Toolkit for Windows server 2003? I tried using version 8.0 but it fails to install on Windows server 2003. thanks
3
votes
1answer
1k views

No way to set maximum retrieved rows in pgadmin query tool

I'm using version 1.16.1, and I can't find a "max(imum) rows" param to tweak. Any help would be appreciated.
0
votes
1answer
40 views

Is there a system primary key associated with each row?

Does a system primary key or unique identifier for each row in a table exist? Like @@ROWID, @@IDENTIFER, or some other identifier that uniquely identifies each row regardless of how it was created? ...
3
votes
2answers
2k views

Is there a fast way to change column type without dropping the clustered index?

I have a large table that is clustered index on a bigint. We would like to change it to just an int to reduce the space and improve the performance. However, dropping the clustered index and recreate ...
0
votes
1answer
54 views

Table Design for user-specific and user-agnostic criteria

I want to design a table that is general enough to accommodate an increasing number of achievements as I come up with new accomplishments to reward. Initially, I thought to design the table as ...
3
votes
1answer
391 views

How un-clustered is a CLUSTER USING table in PostgreSQL

I have some tables which benefit greatly from CLUSTER ON/CLUSTER USING in Postgres SQL: # CLUSTER table USING index_name; # ANALYZE VERBOSE table; # CLUSTER VERBOSE; A maintenance task periodically ...
2
votes
0answers
50 views

How to remove leaf member values?

I have a dimension hierarchy that is related to multiple fact tables with different granularities. In the case of one fact table, it relates to the middle level of a three level hierarchy. When you ...
0
votes
3answers
3k views

Is it a good practice to create tables dynamically in a site?

A friend asked me to build a site with a few "static" and "dynamic" tables. In fact he wants to have a few tables which can't be deleted, and some "dynamic" tables which can be created directly from ...
0
votes
1answer
425 views

Time series data for ad platform

I am trying to figure out how to store time series data for an ad platform I am working on. Basically I want to know some strategies/solutions for storing billions of rows of data so that I can ...
4
votes
1answer
960 views

CTE memory space [closed]

How do CTE memory space work? When you have complex SQL statements executing with the CTE and you get unusually large result set, can it increase the logical reads of the query? I have a CTE that is ...
6
votes
3answers
2k views

PostgreSQL group roles

This is not a "group by" question. I am struggling with permissions in postgres because I apparently don't understand how group roles work. Searching for this on SO has proven difficult because I get ...
2
votes
1answer
50 views

Audit full text activity

I need to find when and which user created full text catalog, and who added/modified/deleted the columns (that were full text indexed) in that full text catalog.
5
votes
1answer
382 views

SA permissions issues with many nested objects

I have a broker application that's relatively complicated. Today, after I made some changes, I started getting the error: The server principal 'sa' is not able to access the database 'XYZ' under ...
4
votes
1answer
126 views

How to get the information of the optimizer of PostgreSQL?

I am curious about the information like total optimization time the time spent on each stage of optimization the number of alternative plans and the cost of each alternative plan.
3
votes
1answer
91 views

psql coloured prompt misbehaving

In theory, there is a possibility to use coloured prompts in psql. I decided (not the first time :) that I need them, so I thought I would give them a try. So I have in my .psqlrc the following: ...
3
votes
1answer
2k views

How do DELETE / TRUNCATE affect table / tablespace?

I am piggybacking off of this question, but asking it from the Oracle perspective. Specifically, how does a DELETE/TRUNCATE affect the size of the table and/or tablespace?
1
vote
0answers
260 views

Performance Hit when upgrading to Oracle 11gr2

I am experiencing the same symptoms as noted in this question which was closed and does not have a satisfactory answer. Original Question We've recently upgraded from Oracle 10gR2 (10.2.0.4 ) to ...
15
votes
2answers
15k views

How to avoid using variables in WHERE clause

Given a (simplified) stored procedure such as this: CREATE PROCEDURE WeeklyProc(@endDate DATE) AS BEGIN DECLARE @startDate DATE = DATEADD(DAY, -6, @endDate) SELECT -- Stuff FROM Sale ...
0
votes
1answer
74 views

Single quote issue

I have to update a column where I am giving query which is Update Table Set col = '[189] IS NOT NULL and [189] <> ''' Where colid= 198 But it's giving output:- [189] IS NOT NULL and ...
6
votes
1answer
989 views

Database table design question

Firstly, database novice here. I'm trying to create a system for processing Sales Orders into Purchase Orders and then split the Purchase Order into Shipping Containers. The systems needs to be able ...
0
votes
2answers
9k views

Use an Alias in Where Clause Subquery

I need to show some fields from another table in Oracle. Here is my query: SELECT ANGGARAN.SIMPEG_PEGAWAI.ID_PEGAWAI AS KODE, ANGGARAN.SIMPEG_PEGAWAI.NAMA, ANGGARAN.SIMPEG_PEGAWAI.NIP, ...
0
votes
1answer
92 views

Search speed increase

I've heard that some queries like DELETE, or changing the structure of a table can decrease the speed of the search in a table. First: is this true , or not? Second: is there any way to increase ...
2
votes
1answer
5k views

Issue on mysqldump in MySQL5.6

I did upgrade the MySQL server from 5.5 to 5.6 I am trying to take dump for a table like this mysqldump -uroot -p dba admin > D:\admin.sql But it gets following error mysqldump: Couldn't ...
0
votes
2answers
1k views

How to add rows/columns to the table in runtime in SSRS 2008

Usually we design the table to have x number of rows and y number of columns in a report. But how can we create a report which adds the rows and columns dynamically at run time based on the result of ...
0
votes
1answer
1k views

Autogrowth of database and log file

I am confused what this autogrowth property does for any database or log file in SQL Server. According to my understanding: If we set autgrowth for database as restricted then its size will ...
-1
votes
1answer
83 views

checking a folder whether required file is present at a regular interval [closed]

i have 4 folder hierarchy in a following format : Hourly Daily Weekly Monthly. In every folder i have files which is coming in a frequency based on their folder's name. Now , i have ...
7
votes
3answers
158 views

Tablespace on ephemeral storage

For performance reasons in some scenarios, e.g. Amazon EC2, you have access to a faster and cheaper storage device, which loses all its data on reboots, so it is called "ephemeral". This question is ...
1
vote
0answers
3k views

PL/SQL extremely slow FETCH performance

I have a stored procedure that includes (among many other things) a dynamic query with a LOOP and a FETCH. The fetch has to potential retrieve a large amount of data as one column contains spatial ...
0
votes
3answers
10k views

How to restore SQL Server 2008 R2 backup to SQL Server 2008 [duplicate]

I am unable to restore a backup from a 64-bit instance onto a 32-bit instance. Source Server: Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Destination server: Microsoft SQL Server ...
4
votes
2answers
860 views

Recommendation for mySQL table structure (no code)

I need some advice on how to layout the tables for a MySQL database. I will first describe what I am trying to do: I have a table for users. (This covers basic info for now) A user will select a ...
0
votes
1answer
864 views

How to output query to file using SQLite3

Is there an equivalent to Oracle's spool for sqlite3?
0
votes
1answer
109 views

When is it worth it to use Triggers and stored procedures/functions? [closed]

As an example, lets say I have a forum application and for every topic that is created, I have a trigger that fires a database function creating a post.(lets assume we have a topics table and a post ...
4
votes
1answer
267 views

Table partitioning filegroup

Can I use the same filegroup for multiple tables when partitioning a table? I partitioned a items table by year. It created five filegroups. Can I use the same file group for orders table or will I ...
0
votes
0answers
465 views

Optimizing “Removing duplicates” thread state

I'm trying to hunt down MySQL variables/settings and metrics relevant to the "Removing duplicates" thread state. Here's a snippet from show full processlist. Id User Host db Command ...
0
votes
1answer
714 views

What's the most effective way to back-up / save data on Oracle 11g large data sets?

We have a database(actually more databases split by primary access path, modulo on a key.) with millions of records (about 400 millions ). Right now I need to save a specific table userData(which has ...
0
votes
1answer
106 views

Can I use the database and query it while full-text indexing?

I need to index my database, but I need to query it while it is indexing, it may take a long time, can I do that?
16
votes
2answers
9k views

Configuring PostgreSQL for read performance

Our system write a lots of data (kind of Big Data system). The write performance is good enough for our needs but the read performance is really too slow. The primary key (constraint) structure is ...
2
votes
2answers
3k views

Running a query within a scheduled job

I am looking at running the following query within a scheduled job weekly: Select TOP 10 s.database_name, m.physical_device_name, CAST(DATEDIFF(second, ...
0
votes
1answer
144 views

Why does copied MySQL database have different data than source?

I am trying to migrate database A to database B. I have tried various methods for this, including... Using Navicat, do Tools > Data Transfer, copying structure and data from A to B Using Navicat, ...
1
vote
3answers
6k views

Should I use two databases or two schemas?

We are currently having one Oracle instance on RAC with one database created. A new requirement came to our database team to temporarily (1-2 months) host a new application that is independent of ...
8
votes
3answers
411 views

Inconsistency in repeatable read

http://www.postgresql.org/docs/9.2/static/transaction-iso.html The Repeatable Read mode provides a rigorous guarantee that each transaction sees a completely stable view of the database. However, ...
3
votes
1answer
818 views

BULK INSERT Data from file but ignore the first occurence of field terminator

I have a file that has data arranged in the following style: 1 1 0.5102 0.4898 0.0000 0.0000 0.0000 1 2 0.3114 0.6886 0.0000 0.0000 0.0000 I need to load ...
0
votes
0answers
333 views

Missing values in INNER JOIN MS-Access?

When I run the following query in MS-Access: SELECT a1.ConStateNumber, a2.ConStateNumber FROM qryW2_yr_sum_slash_qryW2_q4_sum_result a1 INNER JOIN qryW2_q3_sum a2 ON a1.ConStateNumber = ...
3
votes
2answers
6k views

SQL Server clustered index high fragmentation

I've got a Table with an Integer (4bytes) as primary key. it's defined as an identity. it is also the clustered index. Inserts are working perfectly fine. After inserting 2000 rows the fragmentation ...
1
vote
2answers
4k views

Is it better to use AUTOCOMMIT = 0

Is it better to use (for perfomance tuning) AUTOCOMMIT = 0 before bulk inserts of data in MySQL, if the insert query looks like INSERT INTO SomeTable (column1, column2) VALUES ...
2
votes
2answers
1k views

How to rollback the identity seed after deadlock

Now that's an approximate sequence of operations Im performing: SET IDENTITY_INSERT <table-name> ON; INSERT SOMETHING to <table-name> with explicitly specifyed id DECLARE @oldID bigint ...

15 30 50 per page