Re: [PERFORM] Help optimize view
> From: Kevin Grittner [mailto:[EMAIL PROTECTED] > > First off, let's make sure we're optimizing the query you > really want to run. > AND binds tighter than OR, so as you have it written, it is > the same as: > > HAVING "PrintSamples"."MachineID" = 4741 > OR ( "PrintSamples"."MachineID" = 4745 > AND "AnalysisModules"."AnalysisModuleName" = 'NMF' > AND "ParameterNames"."ParameterName" = 'NMF' > AND "tblColors"."ColorID" <> 3 > AND "PrintSamples"."TestPatternName" LIKE 'IQAF-TP8%'; > ) > > I fear you may really want it evaluate to: > > HAVING ("PrintSamples"."MachineID" = 4741 OR > "PrintSamples"."MachineID" = 4745) > AND "AnalysisModules"."AnalysisModuleName" = 'NMF' > AND "ParameterNames"."ParameterName" = 'NMF' > AND "tblColors"."ColorID" <> 3 > AND "PrintSamples"."TestPatternName" LIKE 'IQAF-TP8%'; The query I really want to run is several times larger than this. I didn't think people would want to wade through pages and pages worth of SQL and then explain analyze results - especially when I'm fairly certain that optimizing this smaller part of the overall aggregate query would provide me the help I was looking for. You're right about what I really want the query to evaluate to. I'll give your suggestion a try. Thanks. Mike ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[PERFORM] Terminology Question
Terminology Question: If I use the following statement: I am backing up schema XYZ every 30 minutes. Does this statement imply that I am only backing up the definition of the data? Or does it mean that I am backing up the definition of the data and the data within the schema object? Thanks, Lance Campbell Project Manager/Software Architect Web Services at Public Affairs University of Illinois 217.333.0382 http://webservices.uiuc.edu
Re: [PERFORM] Terminology Question
On 8/20/07, Campbell, Lance <[EMAIL PROTECTED]> wrote: > > Terminology Question: > > If I use the following statement: > > I am backing up schema XYZ every 30 minutes. > > Does this statement imply that I am only backing up the definition of the > data? Or does it mean that I am backing up the definition of the data and > the data within the schema object? In db parlance, schema means two different things really. One is that layout of your data (how tables are related etc...) The other is the namespace that a set of objects can live in. i.e. There is a certain amount of overlap here as well. dbname.schemaname.objectname.fieldname In this instance, "backing up" a schema pretty much implies the namespace version of schema. OTOH, a phrase like "I think your schema has some design flaws pretty obviously points to the first definition relating to the layout of your data. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [PERFORM] Terminology Question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Campbell, Lance wrote: > Terminology Question: > > If I use the following statement: > > > > I am backing up schema XYZ every 30 minutes. > > > > Does this statement imply that I am only backing up the definition of > the data? Or does it mean that I am backing up the definition of the > data and the data within the schema object? I read that as you are backing up the schema and all objects + data within the schema XYZ every 30 minutes. Joshua D. Drake > > > > Thanks, > > > > Lance Campbell > > Project Manager/Software Architect > > Web Services at Public Affairs > > University of Illinois > > 217.333.0382 > > http://webservices.uiuc.edu > > > > - -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240 PostgreSQL solutions since 1997 http://www.commandprompt.com/ UNIQUE NOT NULL Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate PostgreSQL Replication: http://www.commandprompt.com/products/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGydWDATb/zqfZUUQRAjYBAJ0djuYjUDTSQXn2Crg5eEOgVZTDVACcC1M7 goKAhBqQWByziN5mVULUYo8= =PZ/+ -END PGP SIGNATURE- ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate