Re: [sqlite] Help speeding up very slow query

2004-10-30 Thread Angelo Brigante, Jr.
D. Richard Hipp wrote: What's the schema? Do you have an index? CREATE TABLE Master ( playerID text, managerID text, hofID text, birthYear integer, birthMonth integer, birthDay integer, birthCountry text, birthState text, birthCity text, deathYear integer, deathMonth integer, deathDay integer, d

Re: [sqlite] Help speeding up very slow query

2004-10-30 Thread D. Richard Hipp
Angelo Brigante, Jr. wrote: SELECT master.nameLast, sum(batting.hr) FROM master,batting WHERE master.playerid = batting.playerid GROUP BY master.nameLast, batting.playerid HAVING sum(batting.hr) > 500 ORDER BY sum(batting.hr) DESC; In both postgresql and Microsoft Access 2000 this query takes 2 and

[sqlite] Help speeding up very slow query

2004-10-30 Thread Angelo Brigante, Jr.
Hi, First let me say that I am new to sqlite. My situation is this, I have two tables in an sqlite 3.0.8 database. One table (Master) is a list of biographical data about baseball players: firstname, lastname, hometown, etc. The second table (Batting) is comprised of each players stats: hits, home