This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Set number of shard | |
ALTER DATABASE citus SET citus.shard_count = 64; | |
-- Explain across all shards | |
SET citus.explain_all_tasks TO true; | |
-- Size of all distributed tables excluding indexes but including TOAST, free space map, and visibility map | |
SELECT logicalrelid::text tablename, pg_size_pretty(citus_table_size(logicalrelid::text)) size FROM pg_dist_partition group by tablename; | |
-- Size of all distributed tables including all indexes and TOAST data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CustomWidget = createWidget({ | |
widget: { | |
render({ state, helper }) { | |
const refine = () => { | |
const next = state.query === "" ? "Apple" : ""; | |
helper.setQuery(next).search(); | |
}; | |
return { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// With multiple package | |
import { | |
connectHits, | |
connectRefinementList | |
} from "react-instantsearch-connectors"; | |
import { | |
InstantSearch, | |
Configure, | |
SearchBox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class e1_bonus_stream extends HandsOnSuite { | |
sealed trait Stream[+A] { | |
def map[B](fonction:A => B):Stream[B] | |
def flatMap[B](fonction:A => Stream[B]):Stream[B] | |
def filter(fonction:A => Boolean):Stream[A] |