Questions tagged [physical-design]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
48 views

PostgreSQL Index Only Scan can NOT return ctid

I have this table in PostgreSQL 11: CREATE TABLE A (id bigint PRIMARY KEY, text text) Now I want to fetch the ctid of rows meeting some condition like id = 123. However, even using pg_hint_plan to ...
8
votes
2answers
349 views

Fastest way to split/store a long string for charindex function

I have a 1 TB string of digits. Given a 12-character sequence of digits I want to get the start-position of this sequence in the original string (charindex function). I have tested this with a 1GB ...
1
vote
1answer
28 views

MSSQL database physical design: RAID or spreading filegroups across different physical drives?

I'm going to build a Microsoft SQL server database which could end up being more than 40 TB in size. There are some quite large tables in the DB with more about 1010 .. 11 records. Every table has ...
3
votes
1answer
519 views

One big table vs few smaller

Please take note that the example below is just an example, my scenario is way more complex and the way i'm trying to model it really makes sense Let's say i'm creating a table for audit events in ...
1
vote
1answer
181 views

How to Store Skip Lists on Disk

I am new to thinking in terms of databases. I have read about how B-trees are stored on disk but I haven't seen an actual implementation or read about how it works for B-trees. Wondering how one ...
2
votes
1answer
43 views

How to Store Trees on Disk

I am wondering how to store trees on a physical disk, for perhaps a tree-oriented database like an XML database. Wikipedia states about XML databases: ...custom optimized data structures are used ...
3
votes
3answers
2k views

Performance of using a non-clustered index as primary key

Background I am designing a database for a record management system. It's early stages as I am considering what to use as a primary key: INT or UNIQUEIDENTIFIER. The reason for considering ...
3
votes
2answers
475 views

Most efficient data type for a column storing numeric values between 0 and 100

On my MySQL DB I was thinking of using TINYINT (Unsigned)? Would you use Byte on SQL Server?
5
votes
1answer
167 views

Can you gain the performance benefits of partition elimination without changing SQL module or table definitions?

I work for a company that has a multi-tenant database model that doesn't currently use database partitioning. The ideal end-state would be adding a new TenantID column to every existing table, ...
2
votes
2answers
259 views

Best Way To Migrate Existing Production Database To New Physical Storage Structure

I have recently taken a job as a Senior Database Administrator at a small but rapidly growing company. My first order of business was a clean up the logical design of the main database (adding primary ...
-1
votes
1answer
514 views

Logical model in workbench

I have a physical data model of db in MySQL Workbench, how i can create an a logical model of this db(like in Allfusion data modeler(ERwin))? May be Sorry for my english!
0
votes
1answer
1k views

DBPATH, LOGPATH and STORAGEPATH

Assuming that there are only two available paths, say /log and /data. Would it be better to set DBPATH to /log or /data. I.e. CREATE DATABASE WHATEVER AUTOMATIC STORAGE YES ON /data DBPATH ON /log; ...
0
votes
1answer
40 views

Mapping 5 columns to 1 (ID, dimension) table without 5 joins?

I'm using survey monkey's API to dump survey data into a SQL data warehouse. So I'm dumping response data into a table 'resonses' thusly: survey_id, Q1, Q2, Q3, Q4, Q5 survey3944, 848948344, ...
3
votes
1answer
66 views

How does Hash Join works with relational operators other than equality operator?

I have been reading about Hash Join and how does it work in physical level. However, there is some thing that I don't understand (because of my lack of knowledge). This is the algorithm of Hash Join ...
3
votes
1answer
346 views

Should a table be split if only a particular column gets updates?

I have a table in my MySQL 5.7 database, which has 9 columns. One column is an AUTO INCREMENT PRIMARY KEY, where as the other 6 contain some data, which isn't going to be updated in a year. Now, the ...
5
votes
2answers
61 views

Allocation strategy where tables regularly grow and shrink by large amounts

I have a SQL Server 2014 database with 100+ tables that have a 5% growth rate over the course of a year. Lots of reading, very little writing. This database is going to expand by another set of 20+ ...
4
votes
2answers
532 views

Wide clustered index vs multiple narrow nonclustered indexes?

Say I have a contrived Student table like so: CREATE TABLE Student ( Id IDENTITY INT, SchoolId INT NOT NULL, FirstName VARCHAR(20) NOT NULL, LastName VARCHAR(20) NOT NULL ) ...
13
votes
1answer
3k views

Composite Primary Key in multi-tenant SQL Server database

I'm building a multi-tenant app (single database, single schema) using ASP Web API, Entity Framework, and SQL Server/Azure database. This app will be used by 1000-5000 customers. All the tables will ...
3
votes
1answer
71 views

In SQL Server would misc pages be pushed out when an object grows within a mixed extent?

In SQL Server 2008-2012, objects (including tables) are first put in a mixed extent. An extent can accommodate up to 8 pages and accommodates more than one type of page (meaning: pages from more than ...
1
vote
1answer
296 views

ER-Model for Borrowing-Lending-Network?

I plan on creating my first database so this is going to be a newbie question. My database is supposed to be for a Borrowing-Lending-Network where users can borrow products from other users. Creating ...
1
vote
2answers
280 views

Index and rows placement within database files

Where are the indexes and data tables stored within a physical database file or a page of a physical file : Can there be different rows from different tables in the same physical page ? How does ...
5
votes
1answer
3k views

Does it make sense to run a cluster of database servers in docker containers?

I'm currently looking into setting up a database cluster (MySQL Galera or Percona) but I have only 2 machines. However, according to many sources I've read (This article from the Mariadb KB), the ...
9
votes
2answers
18k views

What is the fastest way to fetch the last row from a table?

I have a PostgreSQL table, Prices, with the columns: price (Decimal) product_id (Int) There are also created_at and updated_at columns. Prices get updated regularly and I keep old prices in the ...
1
vote
1answer
186 views

Data center from scratch which way to go

My budget for a data center (hardware,OS licences, SQL Licences WithOut CALS ) is around $50K~$60K. I have needs for around 200 users and my apps works only works in Microsoft environment (Window ...
9
votes
1answer
2k views

How does PostgreSQL physically order new records on disk (after a cluster on primary key)?

Need to know how PostgreSQL orders records on disk. In this case, I would like to take advantage of index combination as stated in the docs, which as I understand uses bitmaps to get matching rows ...
2
votes
3answers
3k views

Usefulness of a multi-attribute index

If an index has more than one attribute in it, is there any speed gained in a select statement whose where clause uses one of the attributes in the index? For example, take a table T with an index on ...
3
votes
1answer
4k views

How to design tables for players in a tournament?

I need help with my database table design. I have group which contains a list of players. In every group each player plays games with other players. Game has also some result for example 1:0 and ...
5
votes
2answers
17k views

Separate stored procedures for inserts and updates?

I have a table in Microsoft SQL Server. Sometimes I need to update, and sometimes I need to insert. I could write 2 stored procedures: InsertNewPerson UpdatePertsonById But I was thinking to write ...
4
votes
1answer
2k views

What is the best practice for physical deployment of data marts?

We are just starting to get into business intelligence at our company. We have some architects who are designing our data warehouse and also our data marts. They are using star schema for both designs....