More details here some benchmark
Same query with different number of elements in own database.
insertBookingRandom.py
: This script is likely used to insert random booking data into a database or a system. It could be used for testing the functionality of a booking system by populating it with sample data to ensure that bookings are being recorded and processed correctly.test.py
: This script is typically used to run a series of unit tests on your application. It might include a suite of tests that validate the correctness of your application's logic, functions, and classes to ensure that recent changes haven't broken existing functionality.
# How to run the scripts
python insertBookingRandom.py
python test.py
Create table in psql:
CREATE TABLE cd.bookings
(
bookid integer NOT NULL,
facid integer NOT NULL,
memid integer NOT NULL,
starttime timestamp NOT NULL,
slots integer NOT NULL,
CONSTRAINT bookings_pk PRIMARY KEY (bookid),
CONSTRAINT fk_bookings_facid FOREIGN KEY (facid) REFERENCES cd.facilities(facid),
CONSTRAINT fk_bookings_memid FOREIGN KEY (memid) REFERENCES cd.members(memid)
);