Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8d5d8ff5
Commit
8d5d8ff5
authored
Jun 03, 2021
by
Jonston Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some issues in polymorphic_associations.md
parent
83ecd3c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
doc/administration/nfs.md
doc/administration/nfs.md
+1
-1
doc/development/polymorphic_associations.md
doc/development/polymorphic_associations.md
+7
-7
No files found.
doc/administration/nfs.md
View file @
8d5d8ff5
...
...
@@ -17,7 +17,7 @@ is recommended over NFS where possible, due to better performance.
File system performance can impact overall GitLab performance, especially for
actions that read or write to Git repositories. For steps you can use to test
file system performance, see
[
File
s
ystem Performance Benchmarking
](
operations/filesystem_benchmarking.md
)
.
[
File
S
ystem Performance Benchmarking
](
operations/filesystem_benchmarking.md
)
.
## Gitaly and NFS deprecation
...
...
doc/development/polymorphic_associations.md
View file @
8d5d8ff5
...
...
@@ -62,19 +62,19 @@ AND source_id = 13083;
```
Here PostgreSQL can perform the query quite efficiently if both columns are
indexed
, but as the query gets more complex
it may not be able to use these
indexes eff
icient
ly.
indexed
. As the query gets more complex,
it may not be able to use these
indexes eff
ective
ly.
## Mixed Responsibilities
Similar to functions and classes a table should have a single responsibility:
Similar to functions and classes
,
a table should have a single responsibility:
storing data with a certain set of pre-defined columns. When using polymorphic
associations
you are instead
storing different types of data (possibly with
associations
, you are
storing different types of data (possibly with
different columns set) in the same table.
## The Solution
Fortunately
there is a very simple
solution to these problems: use a
Fortunately
, there is a
solution to these problems: use a
separate table for every type you would otherwise store in the same table. Using
a separate table allows you to use everything a database may provide to ensure
consistency and query data efficiently, without any additional application logic
...
...
@@ -120,8 +120,8 @@ FROM pending_group_members
WHERE
group_id
=
4
```
If you want to get both you can use a
UNION
, though you need to be explicit
about what columns you want to
SELECT
as otherwise the result set uses the
If you want to get both you can use a
`UNION`
, though you need to be explicit
about what columns you want to
`SELECT`
as otherwise the result set uses the
columns of the first query. For example:
```
sql
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment