Oracle
From Andreida
Index
Show:
select * from dba_ind_columns where lower(table_name) = '<table>'; -- you only change <table>
Create:
create index <indexName> on <table> (<column1>, <column2>, ...);
Drop with either
drop <indexName>;
or
alter table <table> drop constraint <indexName>;
Select
Samples:
select * from <table> sample(0.1);
Select <n> rows:
select <field1>, <field2> from (select <field1>, <field2>, row_number() over (order by <field2>) r from items) where r between 1 and <n>;