Subject | Re: Performance of Firebird vs. other DBMS |
---|---|
Author | johnson_dave2003 |
Post date | 2005-08-16T16:54:37Z |
--- In firebird-support@yahoogroups.com, "laurenz_brein"
architecture, because it needs to know whether or not the row is
visible to the transaction. Select count(*) is not a simple select
to this architecture.
A descending index on parentID may help.
I'll review this in more detail later.
>select count (*) must hit every row in the table in a generational
> SELECT COUNT(*) FROM PARENT WHERE NUMMER < ?
> SELECT COUNT(*) FROM CHILD WHERE NUMMER < ?
> INSERT INTO PARENT (ID, NAME, NUMMER) VALUES (?, ?, ?)
> INSERT INTO CHILD (ID, PARENT_ID, NAME, NUMMER) VALUES (?, ?, ?, ?)
> DELETE FROM PARENT WHERE ID = ?
> DELETE FROM CHILD WHERE ID = ?
> SELECT NAME, NUMMER FROM PARENT WHERE ID = ?
> SELECT PARENT_ID, NAME, NUMMER FROM CHILD WHERE ID = ?
> UPDATE PARENT SET NAME = ?, NUMMER = ? WHERE ID = ?
> UPDATE CHILD SET PARENT_ID = ?, NAME = ?, NUMMER = ? WHERE ID = ?
> SELECT COUNT(*) FROM PARENT WHERE ID > ?
> SELECT COUNT(*) FROM CHILD WHERE PARENT_ID > ?
architecture, because it needs to know whether or not the row is
visible to the transaction. Select count(*) is not a simple select
to this architecture.
A descending index on parentID may help.
>yes ...
> Do you think that the difference you mention can account for
> a factor of 4 for 'simple selects' compared to the worst competitor
> and a factor of 6 for 'table scans'?
I'll review this in more detail later.