Skip to content

Instantly share code, notes, and snippets.

View akki's full-sized avatar
🇮🇳
.

Akshesh Doshi akki

🇮🇳
.
View GitHub Profile
@akki
akki / index.rst
Last active March 6, 2016 10:46
Draft for indexes (DEP)

DEP xxxx: Reworking Django's Indexes

DEP

xxxx

Author

Marc Tamlyn, Akshesh Doshi

Status

Draft

Type

Feature

Created

2016-03-03

#model
class Student(models.Model):
name = models.CharField(max_length=200, db_index=True, unique=True)
branch = models.CharField(max_length=20, db_index=True)
college = models.CharField(max_length=100, unique=True)
year = models.CharField(max_length=100)
def __unicode__(self):
return self.name
@akki
akki / Reworking Django's Indexes.rst
Last active March 28, 2017 05:53
My GSOC 2016 proposal for Django

Reworking Django's Indexes

Table of Contents

  1. Abstract
  2. Motivation

INDEX STATEMENTS

POSTGRESQL

  • CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] idx_name ON table_name [ USING method ] ( { col_name | ( expression ) } [ opclass ] [ ASC | DESC ])
  • DROP INDEX [ IF EXISTS ] idx_name [, idx_name1, ...]

INDEX STATEMENTS

POSTGRESQL

  • CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] idx_name ON table_name [ USING method ] ( { col_name | ( expression ) } [ opclass ] [ ASC | DESC ]
  • DROP INDEX [ IF EXISTS ] idx_name [, idx_name1, ...]
@akki
akki / gsoc-report.md
Last active January 13, 2019 15:48
My work submission report for GSoC 2016
Desired output:
relname | array | indisunique | indisprimary | order | type (can skip this if it is difficult to get this column)
---------------------------------+-------+-------------+--------------+-------------+-----------------------------------------------------------
ticket26180_indexes_spamin_pkey | {id} | t | t | {ASC} | btree
ticket26180_a_6fe9a5_idx | {a,b} | f | f | {ASC, ASC} | btree
test26180_indexes_spamin_atpata | {a,b} | f | f | {ASC, DESC} | btree
test26180_indexes_spamin_b_hsh | {b} | f | f | | hash
test26180_indexes_spamin_a_hsh | {a} | f | f | | hash
mkdir /var/lock/subsys
touch /var/lock/subsys/listener
sudo rm -rf /dev/shm
sudo mkdir /dev/shm
sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
sudo service oracle-xe restart
___ _ __ _ _ ___ ___ ___
/ \__ _| |_ __ _ / _(_) | ___ / \/ __\ / _ \
/ /\ / _` | __/ _` | |_| | |/ _ \ / /\ /__\// / /_\/
/ /_// (_| | || (_| | _| | | __/ / /_// \/ \/ /_\\
/___,' \__,_|\__\__,_|_| |_|_|\___| /___,'\_____/\____/
Collection to check:
Prints details (Y/N/full)? Checking collection #8:
-------------------------------------------------------------------
https://qph.ec.quoracdn.net/main-qimg-b1a6103989e261ac377e821fbd192393-c