473,789 Members | 2,694 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Optimizer choosing smaller index instead of right one

Hello,

This is probably a common problem, but I couldn't really find a direct answer in
the archives (or maybe just couldn't find one that satisfied me ;-). I created
an index specifically to help a query and the optimizer does not use it. It
prefers an older index that has one less column, but that yields much poorer
performance.

The query get the smallest date in a period, for some criteria. The one table
used in the query has 604494 rows. The index I created to try to optimize it is
"xie3cham_servi co", and has all the three columns of the table that are used in
the query. But the index being used is actually xie2cham_servic o (as can be seen
below) which has only two columns, one of them completely useless for the query!
I'm probably missing some setting, but I couldn't figure out which.

One last comment, if I test this on a server all by myself, after some test
(when, I imagine, all related disk pages are on cache) the time difference
between the two situations is much smaller (4secs against 2 secs), but, of
course, this doesn't help me much ...

Here is the associated information:

Table "public.cham_se rvico"
Column | Type | Modifiers
------------------+--------------------------------+-----------
dt_inicial | timestamp(0) without time zone | not null
cod_bxs | integer | not null
chave | integer | not null
identificacao | integer | not null
cod_cifra | character varying(25) | not null
dt_identificaca o | timestamp(0) without time zone | not null
dt_ocupacao | timestamp(0) without time zone |
temp_troca | integer |
temp_ura | integer |
temp_filapa | integer |
temp_atendpa | integer |
temp_total | integer |
dt_finalizacao | timestamp(0) without time zone |
pa | integer |
flg_tipodiscage m | character(1) |
cod_liberservic o | integer |
dt_login | timestamp(0) without time zone |
id_chave_grupo | character varying(20) |
Indexes: xpkcham_servico primary key btree (dt_inicial, cod_bxs, chave,
identificacao, cod_cifra, dt_identificaca o),
xie1cham_servic o btree (dt_finalizacao , cod_cifra),
xie2cham_servic o btree (id_chave_grupo , dt_inicial),
xie3cham_servic o btree (id_chave_grupo , cod_bxs, dt_finalizacao)
Foreign Key constraints: rchamadaxservic o FOREIGN KEY (dt_inicial, cod_bxs,
chave, identificacao) REFERENCES cham_chamada(dt _inicial, cod_bxs, chave,
identificacao) ON UPDATE NO ACTION ON DELETE NO ACTION

explain analyze SELECT dt_finalizacao FROM cham_servico WHERE id_chave_grupo =
'7458' AND cod_bxs = 1 AND dt_finalizacao > to_timestamp
('2004-04-20','YYYY-MM-DD') AND dt_finalizacao < now() ORDER BY dt_finalizacao
ASC LIMIT 1;

QUERY PLAN

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=15663.77. .15663.77 rows=1 width=8) (actual time=14002.66.. 14002.66
rows=1 loops=1)
-> Sort (cost=15663.77. .15663.83 rows=26 width=8) (actual
time=14002.65.. 14002.65 rows=2 loops=1)
Sort Key: dt_finalizacao
-> Index Scan using xie2cham_servic o on cham_servico
(cost=0.00..156 63.15 rows=26 width=8) (actual time=13604.37.. 13980.16 rows=3173
loops=1)
Index Cond: (id_chave_grupo = '7458'::charact er varying)
Filter: ((cod_bxs = 1) AND ((dt_finalizaca o)::timestamp with time
zone > to_timestamp('2 004-04-20'::text, 'YYYY-MM-DD'::text)) AND
((dt_finalizaca o)::timestamp with time zone < now()))
Total runtime: 45014.06 msec
(7 rows)

Time: 45105,73 ms

If I "drop index xie2cham_servic o;", I get :

explain analyze SELECT dt_finalizacao FROM cham_servico WHERE id_chave_grupo =
'7458' AND cod_bxs = 1 AND dt_finalizacao > to_timestamp
('2004-04-20','YYYY-MM-DD') AND dt_finalizacao < now() ORDER BY dt_finalizacao
ASC LIMIT 1;

QUERY PLAN

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Limit (cost=17600.92. .17600.92 rows=1 width=8) (actual time=8750.64..8 750.64
rows=1 loops=1)
-> Sort (cost=17600.92. .17600.99 rows=26 width=8) (actual
time=8750.63..8 750.63 rows=2 loops=1)
Sort Key: dt_finalizacao
-> Index Scan using xie3cham_servic o on cham_servico
(cost=0.00..176 00.30 rows=26 width=8) (actual time=8432.37..8 743.29 rows=3176
loops=1)
Index Cond: ((id_chave_grup o = '7458'::charact er varying) AND
(cod_bxs = 1))
Filter: (((dt_finalizac ao)::timestamp with time zone >
to_timestamp('2 004-04-20'::text, 'YYYY-MM-DD'::text)) AND
((dt_finalizaca o)::timestamp with time zone < now()))
Total runtime: 8751.50 msec
(7 rows)

Time: 8758,36 ms

Some more environment info:

Postgres 7.3.4 on Linux Redhat 9.

show all:

name | setting
--------------------------------+---------------------------------------
australian_time zones | off
authentication_ timeout | 60
autocommit | on
checkpoint_segm ents | 3
checkpoint_time out | 300
client_encoding | SQL_ASCII
client_min_mess ages | notice
commit_delay | 0
commit_siblings | 5
cpu_index_tuple _cost | 0.001
cpu_operator_co st | 0.0025
cpu_tuple_cost | 0.01
DateStyle | ISO with US (NonEuropean) conventions
db_user_namespa ce | off
deadlock_timeou t | 1000
debug_pretty_pr int | off
debug_print_par se | off
debug_print_pla n | off
debug_print_rew ritten | off
default_statist ics_target | 10
default_transac tion_isolation | read committed
dynamic_library _path | $libdir
effective_cache _size | 1000
enable_hashjoin | on
enable_indexsca n | on
enable_mergejoi n | on
enable_nestloop | on
enable_seqscan | off
enable_sort | on
enable_tidscan | on
explain_pretty_ print | on
fixbtree | on
fsync | on
geqo | on
geqo_effort | 1
geqo_generation s | 0
geqo_pool_size | 0
geqo_random_see d | -1
geqo_selection_ bias | 2
geqo_threshold | 11
hostname_lookup | off
krb_server_keyf ile | FILE:/etc/sysconfig/pgsql/krb5.keytab
lc_messages | pt_BR
lc_monetary | pt_BR
lc_numeric | pt_BR
lc_time | pt_BR
log_connections | off
log_duration | off
log_min_error_s tatement | panic
log_pid | off
log_statement | off
log_timestamp | off
max_connections | 32
max_expr_depth | 10000
max_files_per_p rocess | 1000
max_fsm_pages | 10000
max_fsm_relatio ns | 1000
max_locks_per_t ransaction | 64
password_encryp tion | on
port | 5432
pre_auth_delay | 0
random_page_cos t | 4
search_path | $user,public
server_encoding | SQL_ASCII
server_min_mess ages | notice
shared_buffers | 64
show_executor_s tats | off
show_parser_sta ts | off
show_planner_st ats | off
show_source_por t | off
show_statement_ stats | off
silent_mode | off
sort_mem | 1024
sql_inheritance | on
ssl | off
statement_timeo ut | 0
stats_block_lev el | off
stats_command_s tring | off
stats_reset_on_ server_start | on
stats_row_level | off
stats_start_col lector | on
superuser_reser ved_connections | 2
syslog | 0
syslog_facility | LOCAL0
syslog_ident | postgres
tcpip_socket | on
TimeZone | unknown
trace_notify | off
TRANSACTION ISOLATION LEVEL | READ COMMITTED
transform_null_ equals | off
unix_socket_dir ectory | unset
unix_socket_gro up | unset
unix_socket_per missions | 511
vacuum_mem | 8192
virtual_host | unset
wal_buffers | 8
wal_debug | 0
wal_sync_method | fdatasync
zero_damaged_pa ges | off

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #1
6 1576
Please ignore my previous message, its a duplicate.Sorry for the
inconvenience!

Ian.
Ian Ribas wrote:
....

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2
Please ignore my previous message, its a duplicate.Sorry for the
inconvenience!

Ian.
Ian Ribas wrote:
....

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #3
Ian Ribas <ia*******@digi tro.com.br> writes:
The index I created to try to optimize it is "xie3cham_servi co", and
has all the three columns of the table that are used in the query. But
the index being used is actually xie2cham_servic o (as can be seen
below) which has only two columns, one of them completely useless for
the query! I'm probably missing some setting, but I couldn't figure
out which.
The optimizer's cost equations do say that a smaller index should be
preferred over a larger one if the number of rows obtainable from the
index is comparable (which I trust you will agree is reasonable).
I think the real issue here is a datatype conflict. Look closely
at the filter conditions:
-> Index Scan using xie2cham_servic o on cham_servico (cost=0.00..156 63.15 rows=26 width=8) (actual time=13604.37.. 13980.16 rows=3173 loops=1)
Index Cond: (id_chave_grupo = '7458'::charact er varying)
Filter: ((cod_bxs = 1) AND ((dt_finalizaca o)::timestamp with time zone > to_timestamp('2 004-04-20'::text, 'YYYY-MM-DD'::text)) AND ((dt_finalizaca o)::timestamp with time zone < now()))


The two comparisons on dt_finalizacao are unindexable because they
coerce it to a different datatype; the "<" and ">" are the operators on
timestamp with time zone and so they are not relevant to an index on
timestamp without time zone.

Very likely your column really ought to be of type timestamp with time
zone. If you are convinced it should be timestamp without time zone
then you need to fix the values you are comparing to.

I'm also a bit disturbed by the fact that the rows estimates are off by
more than two orders of magnitude (26 est vs 3173 actual). It would
perhaps help if you wrote the boundary date as a simple constant:

... AND dt_finalizacao > '2004-04-20' AND ...

so that the planner had some chance of comparing the constant to its
statistics about the distribution of dt_finalizacao. to_timestamp is
not a constant-foldable function (because it depends on the current
TimeZone setting) and so the query as you've written it looks like

... AND dt_finalizacao > unpredictable_e xpression AND ...

as far as the planner knows. (I'm not sure this will help though;
it may be that the big problem is that the three columns are not
independent, which is something the planner doesn't know because it has
no cross-column statistics.)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #4
Ian Ribas <ia*******@digi tro.com.br> writes:
The index I created to try to optimize it is "xie3cham_servi co", and
has all the three columns of the table that are used in the query. But
the index being used is actually xie2cham_servic o (as can be seen
below) which has only two columns, one of them completely useless for
the query! I'm probably missing some setting, but I couldn't figure
out which.
The optimizer's cost equations do say that a smaller index should be
preferred over a larger one if the number of rows obtainable from the
index is comparable (which I trust you will agree is reasonable).
I think the real issue here is a datatype conflict. Look closely
at the filter conditions:
-> Index Scan using xie2cham_servic o on cham_servico (cost=0.00..156 63.15 rows=26 width=8) (actual time=13604.37.. 13980.16 rows=3173 loops=1)
Index Cond: (id_chave_grupo = '7458'::charact er varying)
Filter: ((cod_bxs = 1) AND ((dt_finalizaca o)::timestamp with time zone > to_timestamp('2 004-04-20'::text, 'YYYY-MM-DD'::text)) AND ((dt_finalizaca o)::timestamp with time zone < now()))


The two comparisons on dt_finalizacao are unindexable because they
coerce it to a different datatype; the "<" and ">" are the operators on
timestamp with time zone and so they are not relevant to an index on
timestamp without time zone.

Very likely your column really ought to be of type timestamp with time
zone. If you are convinced it should be timestamp without time zone
then you need to fix the values you are comparing to.

I'm also a bit disturbed by the fact that the rows estimates are off by
more than two orders of magnitude (26 est vs 3173 actual). It would
perhaps help if you wrote the boundary date as a simple constant:

... AND dt_finalizacao > '2004-04-20' AND ...

so that the planner had some chance of comparing the constant to its
statistics about the distribution of dt_finalizacao. to_timestamp is
not a constant-foldable function (because it depends on the current
TimeZone setting) and so the query as you've written it looks like

... AND dt_finalizacao > unpredictable_e xpression AND ...

as far as the planner knows. (I'm not sure this will help though;
it may be that the big problem is that the three columns are not
independent, which is something the planner doesn't know because it has
no cross-column statistics.)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #5
Effectively, I hadn't seen the cast being done on the field
dt_finalizacao! The query actually runs inside a pgplsql procedure, so
the parameters are unknown constants (variables), but the situation got
much much better when I forced a cast on the constant part of the
condition (as follows), so allowing the planner to correctly choose an
index :

explain analyze SELECT dt_finalizacao
FROM cham_servico
WHERE id_chave_grupo = '7458' AND cod_bxs = 1
AND dt_finalizacao > CAST(to_timesta mp ('2004-04-20','YYYY-MM-DD') AS
TIMESTAMP(0) WITHOUT TIME ZONE)
AND dt_finalizacao < CAST(now() AS TIMESTAMP(0) WITHOUT TIME ZONE)
ORDER BY dt_finalizacao ASC LIMIT 1;

QUERY
PLAN

------------------------------------------------------------------------------------------------------------
Limit (cost=0.00..364 .98 rows=1 width=8) (actual time=52.73..52. 90
rows=1 loops=1)
-> Index Scan using xie1cham_servic o on cham_servico
(cost=0.00..975 6.63 rows=27 width=8) (actual time=52.73..52. 89 rows=2
loops=1)
Index Cond: ((dt_finalizaca o >
(to_timestamp(' 2004-04-20'::text, 'YYYY-MM-DD'::text))::ti mestamp(0)
without time zone) AND (dt_finalizacao < (now())::timest amp(0) without
time zone))
Filter: ((id_chave_grup o = '7458'::charact er varying) AND
(cod_bxs = 1))
Total runtime: 53.11 msec
(5 rows)

Unfortunately, I really must use timestamp without time zone for some
other unrelated reasons ...

Thank you very much for your attention

Best wishes,
Ian.

Tom Lane wrote:
Ian Ribas <ia*******@digi tro.com.br> writes:

The index I created to try to optimize it is "xie3cham_servi co", and
has all the three columns of the table that are used in the query. But
the index being used is actually xie2cham_servic o (as can be seen
below) which has only two columns, one of them completely useless for
the query! I'm probably missing some setting, but I couldn't figure
out which.


The optimizer's cost equations do say that a smaller index should be
preferred over a larger one if the number of rows obtainable from the
index is comparable (which I trust you will agree is reasonable).
I think the real issue here is a datatype conflict. Look closely
at the filter conditions:
-> Index Scan using xie2cham_servic o on cham_servico (cost=0.00..156 63.15 rows=26 width=8) (actual time=13604.37.. 13980.16 rows=3173 loops=1)
Index Cond: (id_chave_grupo = '7458'::charact er varying)
Filter: ((cod_bxs = 1) AND ((dt_finalizaca o)::timestamp with time zone > to_timestamp('2 004-04-20'::text, 'YYYY-MM-DD'::text)) AND ((dt_finalizaca o)::timestamp with time zone < now()))


The two comparisons on dt_finalizacao are unindexable because they
coerce it to a different datatype; the "<" and ">" are the operators on
timestamp with time zone and so they are not relevant to an index on
timestamp without time zone.

Very likely your column really ought to be of type timestamp with time
zone. If you are convinced it should be timestamp without time zone
then you need to fix the values you are comparing to.

I'm also a bit disturbed by the fact that the rows estimates are off by
more than two orders of magnitude (26 est vs 3173 actual). It would
perhaps help if you wrote the boundary date as a simple constant:

... AND dt_finalizacao > '2004-04-20' AND ...

so that the planner had some chance of comparing the constant to its
statistics about the distribution of dt_finalizacao. to_timestamp is
not a constant-foldable function (because it depends on the current
TimeZone setting) and so the query as you've written it looks like

... AND dt_finalizacao > unpredictable_e xpression AND ...

as far as the planner knows. (I'm not sure this will help though;
it may be that the big problem is that the three columns are not
independent, which is something the planner doesn't know because it has
no cross-column statistics.)

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #6
Effectively, I hadn't seen the cast being done on the field
dt_finalizacao! The query actually runs inside a pgplsql procedure, so
the parameters are unknown constants (variables), but the situation got
much much better when I forced a cast on the constant part of the
condition (as follows), so allowing the planner to correctly choose an
index :

explain analyze SELECT dt_finalizacao
FROM cham_servico
WHERE id_chave_grupo = '7458' AND cod_bxs = 1
AND dt_finalizacao > CAST(to_timesta mp ('2004-04-20','YYYY-MM-DD') AS
TIMESTAMP(0) WITHOUT TIME ZONE)
AND dt_finalizacao < CAST(now() AS TIMESTAMP(0) WITHOUT TIME ZONE)
ORDER BY dt_finalizacao ASC LIMIT 1;

QUERY
PLAN

------------------------------------------------------------------------------------------------------------
Limit (cost=0.00..364 .98 rows=1 width=8) (actual time=52.73..52. 90
rows=1 loops=1)
-> Index Scan using xie1cham_servic o on cham_servico
(cost=0.00..975 6.63 rows=27 width=8) (actual time=52.73..52. 89 rows=2
loops=1)
Index Cond: ((dt_finalizaca o >
(to_timestamp(' 2004-04-20'::text, 'YYYY-MM-DD'::text))::ti mestamp(0)
without time zone) AND (dt_finalizacao < (now())::timest amp(0) without
time zone))
Filter: ((id_chave_grup o = '7458'::charact er varying) AND
(cod_bxs = 1))
Total runtime: 53.11 msec
(5 rows)

Unfortunately, I really must use timestamp without time zone for some
other unrelated reasons ...

Thank you very much for your attention

Best wishes,
Ian.

Tom Lane wrote:
Ian Ribas <ia*******@digi tro.com.br> writes:

The index I created to try to optimize it is "xie3cham_servi co", and
has all the three columns of the table that are used in the query. But
the index being used is actually xie2cham_servic o (as can be seen
below) which has only two columns, one of them completely useless for
the query! I'm probably missing some setting, but I couldn't figure
out which.


The optimizer's cost equations do say that a smaller index should be
preferred over a larger one if the number of rows obtainable from the
index is comparable (which I trust you will agree is reasonable).
I think the real issue here is a datatype conflict. Look closely
at the filter conditions:
-> Index Scan using xie2cham_servic o on cham_servico (cost=0.00..156 63.15 rows=26 width=8) (actual time=13604.37.. 13980.16 rows=3173 loops=1)
Index Cond: (id_chave_grupo = '7458'::charact er varying)
Filter: ((cod_bxs = 1) AND ((dt_finalizaca o)::timestamp with time zone > to_timestamp('2 004-04-20'::text, 'YYYY-MM-DD'::text)) AND ((dt_finalizaca o)::timestamp with time zone < now()))


The two comparisons on dt_finalizacao are unindexable because they
coerce it to a different datatype; the "<" and ">" are the operators on
timestamp with time zone and so they are not relevant to an index on
timestamp without time zone.

Very likely your column really ought to be of type timestamp with time
zone. If you are convinced it should be timestamp without time zone
then you need to fix the values you are comparing to.

I'm also a bit disturbed by the fact that the rows estimates are off by
more than two orders of magnitude (26 est vs 3173 actual). It would
perhaps help if you wrote the boundary date as a simple constant:

... AND dt_finalizacao > '2004-04-20' AND ...

so that the planner had some chance of comparing the constant to its
statistics about the distribution of dt_finalizacao. to_timestamp is
not a constant-foldable function (because it depends on the current
TimeZone setting) and so the query as you've written it looks like

... AND dt_finalizacao > unpredictable_e xpression AND ...

as far as the planner knows. (I'm not sure this will help though;
it may be that the big problem is that the three columns are not
independent, which is something the planner doesn't know because it has
no cross-column statistics.)

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2102
by: Carlo Paccanoni | last post by:
I tried this: use northwind go SELECT OrderDate FROM Orders WHERE OrderDate > '19950101' see the query plan? ok
3
1596
by: Philip Yale | last post by:
I'm very puzzled by the choice of NC index being made by the optimizer in this example. I don't actually think it should use an NC index at all. I have: Table: CustomerStatus_T Single data page 19 records Clustered Index on CustomerStatusID:
2
1419
by: Greg Stark | last post by:
Hm, here's a query where the optimizer is choosing the wrong plan by far. I think it boils down to it guessing wrong on how selective an rtree index is, which I guess would be hard to predict. Except if it guesses wrong by assuming it isn't selective it would be maybe 50% slower doing lots of index lookups instead of a more efficient full table scan and join. If it guesses wrong by assuming it'll be very selective as it is in this case...
3
2097
by: Peter Arrenbrecht | last post by:
Hi all We ran into a very annoying optimizer problem recently. We had added a new key and self-join relation to a large production table. That key will be filled very rarely and having just being added was practically never filled in when the first user tried to delete a row from the table. Now, the optimizer tried to enforce RI on the new relation. But instead of using the index generated by the relation, it used a table scan!
1
1800
by: Mike L. Bell | last post by:
Pulling our hair out over this one. We have two databases. One is used for OLTP. The other hosts old closed transactions and is mainly used for reporting. Every month we identify rows in the primary (OLTP) database that are eligible to be moved and ship them over. Been doing this for over a year without any problems. After last weekend's move everything went sour on our history database. A set of canned queries started taking orders of...
0
943
by: Ian Ribas | last post by:
Hello, This is probably a common problem, but I couldn't really find a direct answer in the archives (or maybe just couldn't find one that satisfied me ;-). I created an index specifically to help a query and the optimizer does not use it. It prefers an older index that has one less column, but that yields much poorer performance. The query get the smallest date in a period, for some criteria. The one table used in the query has...
5
9853
by: Venkatesh Subbaramu | last post by:
Hi Expert DBAs, I am facing an issue with a query, can anyone help me through? I have a Query: UPDATE VMUS.MSG_MSTR a SET MSG_STA_ID =5 WHERE a.PROC_ID =2 AND a.file_type_id =1 AND MSG_STA_ID IN (1, 3) AND DATA_REQ_DT IS NOT NULL We have 2 indexes for the table: Indname Column names
3
2376
by: aj | last post by:
DB2 LUW v8.2 FP 14 RHAS 2.1 Sorry if these are newbie questions. Optimizer stuff is black magic to me. For both of these, assume stats are current and an even distribution of data. ------------------------- Lets say I have a table FOO1 that has, among other columns, a column named A. There is a non-unique index on A that has medium selectivity. Lets also say I have a table FOO2 that has, among other columns, a column named B. ...
0
1668
by: P. Adhia | last post by:
Hi, Consider the following query select * from t1 where c1 = ? and c2 = ?
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10195
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6765
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.