Git Product home page Git Product logo

Comments (3)

hfmandell avatar hfmandell commented on August 30, 2024 1

You need to actually create them in your psql environment. Writing them in the schema-indexes.sql file doesn't do anything, it might just be for grading purposes.

After you run your CREATE INDEX ON ... commands in psql, you can check that they exist by running \d [INSERT TABLE NAME]. The indexes should show up if they've been created correctly. Beware, creating these indexes can take anywhere from 5-40 minutes each.

from cmc-csci143.

tennisoctocat avatar tennisoctocat commented on August 30, 2024 1

You can also make it so that the indexes will be created when you initialize your database. To do so, you can add this line to your Dockerfile:

COPY schema-indexes.sql /docker-entrypoint-initdb.d/02.sql

Note that everything in docker-entrypoint-initdb.d is only run when initializing the database, so if you already have a database up and running, adding this line might not result in your indexes being created. So if this is the case @hfmandell's answer is probably the way to go.

from cmc-csci143.

nickwilson3 avatar nickwilson3 commented on August 30, 2024

Thank you for the help! I was able to create the indexes in psql and then when I checked the answers and run time, I was able to get under 4 seconds for the pg_normalized_batch database, but got 5.5 seconds for pg_denormalized. I then stopped working for the night and just logged back into terminal and had to build the container again, load the load_tweets_parallel. sh file, and create the indexes again, but when I test the denormalized database, it is not running the indexes even though the indexes show up in psql when I run \d [table name]. Did anyone else run into this problem?

from cmc-csci143.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.